From: Jorge G. <cl...@us...> - 2007-12-18 09:06:42
|
Update of /cvsroot/easycalc/easycalc In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv13063 Modified Files: calc.c graph.c graph.h graph.rcp.in grsetup.c Log Message: graph area set to 140(+1)x140(+1) in lowRes and 280(+1)x280(+1) in hiRes. fixed bugs in graphic mode Index: calc.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/calc.c,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** calc.c 29 Dec 2006 02:17:37 -0000 1.39 --- calc.c 18 Dec 2007 09:06:36 -0000 1.40 *************** *** 99,103 **** #ifdef SONY_SDK if(gHrMode == hrSony) { ! natbounds->topLeft.x *= 2; natbounds->topLeft.y *= 2; natbounds->extent.x *= 2; --- 99,103 ---- #ifdef SONY_SDK if(gHrMode == hrSony) { ! natbounds->topLeft.x = natbounds->topLeft.x*2 +2; natbounds->topLeft.y *= 2; natbounds->extent.x *= 2; *************** *** 111,115 **** --- 111,118 ---- WinScaleRectangle(natbounds); WinSetCoordinateSystem(save); + natbounds->topLeft.x+=2; } + natbounds->extent.x++; + natbounds->extent.y++; } Index: graph.h =================================================================== RCS file: /cvsroot/easycalc/easycalc/graph.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** graph.h 10 Nov 2006 04:12:56 -0000 1.8 --- graph.h 18 Dec 2007 09:06:37 -0000 1.9 *************** *** 43,47 **** void graph_setcolor(Int16 funcnum) GRAPH; void graph_unsetcolor(void) GRAPH; - void graph_redrawform(void) GRAPH; extern Tgraph_curves graphCurves[MAX_GRFUNCS]; --- 43,46 ---- Index: grsetup.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/grsetup.c,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** grsetup.c 26 May 2007 14:52:10 -0000 1.33 --- grsetup.c 18 Dec 2007 09:06:37 -0000 1.34 *************** *** 883,886 **** --- 883,888 ---- Char *picktitle; + graph_setcolor(-2); + picktitle = MemPtrNew(MAX_RSCLEN); SysStringByIndex(grColorElem, row, picktitle, MAX_RSCLEN); *************** *** 889,895 **** graphPrefs.colors[row] = col; } ! graph_redrawform(); ! FrmDrawForm(frm); ! draw_grType(frm); MemPtrFree(picktitle); handled = true; --- 891,896 ---- graphPrefs.colors[row] = col; } ! ! graph_unsetcolor(); MemPtrFree(picktitle); handled = true; Index: graph.rcp.in =================================================================== RCS file: /cvsroot/easycalc/easycalc/graph.rcp.in,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** graph.rcp.in 10 Nov 2006 04:12:56 -0000 1.37 --- graph.rcp.in 18 Dec 2007 09:06:37 -0000 1.38 *************** *** 142,146 **** PUSHBUTTON "G" ID btnGraph AT (PREVRIGHT+1 1 10 12) GROUP 1 ! GADGET ID graphGadget AT (1 16 140+2 140+3) SELECTORTRIGGER "C " ID btnGraphCalc AT (147 22 10 12) --- 142,146 ---- PUSHBUTTON "G" ID btnGraph AT (PREVRIGHT+1 1 10 12) GROUP 1 ! GADGET ID graphGadget AT (1 17 140 140) SELECTORTRIGGER "C " ID btnGraphCalc AT (147 22 10 12) Index: graph.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/graph.c,v retrieving revision 1.61 retrieving revision 1.62 diff -C2 -d -r1.61 -r1.62 *** graph.c 16 Dec 2007 12:37:17 -0000 1.61 --- graph.c 18 Dec 2007 09:06:37 -0000 1.62 *************** *** 470,476 **** tmpx = graph_xscr2gr(bounds->topLeft.x); tmpx = ceil(tmpx/xscale)*xscale; ! for (;tmpx < graphPrefs.xmax;tmpx+=xscale) { x = graph_xgr2scr(tmpx); ! for (tmpy=ystart;tmpy < graphPrefs.ymax;tmpy+=yscale) { y = graph_ygr2scr(tmpy); if (gHrMode != hrNone) { --- 470,476 ---- tmpx = graph_xscr2gr(bounds->topLeft.x); tmpx = ceil(tmpx/xscale)*xscale; ! for (;tmpx <= graphPrefs.xmax;tmpx+=xscale) { x = graph_xgr2scr(tmpx); ! for (tmpy=ystart;tmpy <= graphPrefs.ymax;tmpy+=yscale) { y = graph_ygr2scr(tmpy); if (gHrMode != hrNone) { *************** *** 555,559 **** { RectangleType natbounds; // bounds in native coordinates - RectangleType clip; // clip rectangle in standard coordinates Coord x, y; #ifdef SUPPORT_DIA --- 555,558 ---- *************** *** 588,599 **** clie_eraserectangle(&natbounds,0); - /* Only (re)draw grid when whole graph gadget is inside the - clip rectangle */ - WinGetClip(&clip); - if (graphPrefs.grEnable[7] /* grid drawing enabled */ && - clip.topLeft.y <= stdbounds.topLeft.y && - clip.topLeft.y + clip.extent.y >= stdbounds.topLeft.y + stdbounds.extent.y) - graph_grid(&natbounds); - /* Draw axes */ x = graph_xgr2scr(0.0); --- 587,590 ---- *************** *** 609,612 **** --- 600,607 ---- graph_unsetcolor(); + + /*Draw grid */ + if (graphPrefs.grEnable[7]) + graph_grid(&natbounds); /* Draw axes labels */ *************** *** 1207,1216 **** return handled; } - - void graph_redrawform(void) - { - FormType *frm = FrmGetFormPtr(frmGraph); - FrmDrawForm(frm); - graph_init_screen(frm, graphGadget); - } --- 1202,1204 ---- |