From: Ton v. O. <tvo...@us...> - 2006-10-05 15:15:59
|
Update of /cvsroot/easycalc/easycalc In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv13607 Modified Files: graph.rcp.in grsetup.c Log Message: Change linestyle selection in graph setup form to use buttons with a frame and always draw the linestyle inside the button with thick (=lowres) lines. People did not notice the linestyle selection, especially in HiRes. Index: grsetup.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/grsetup.c,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** grsetup.c 27 Sep 2006 09:43:09 -0000 1.24 --- grsetup.c 5 Oct 2006 15:15:44 -0000 1.25 *************** *** 563,624 **** #endif ! static void ! draw_grType(FormType *frm) IFACE; static void draw_grType(FormType *frm) { Int8 i,k; ! Coord x, y; RectangleType bounds; ! for(i=0;i<6;i++){ ! FrmGetObjectBounds(frm, FrmGetObjectIndex(frm,grType1+i), &bounds); ! WinEraseRectangle(&bounds, 0); ! x = bounds.topLeft.x; ! y = bounds.topLeft.y + bounds.extent.y - 1; ! if(graphPrefs.functype!=graph_param || i%2==0){ ! ! Coord x1=x+HanderaCoord(3),x2=x+HanderaCoord(6),x3=x+HanderaCoord(9); ! Coord y1=y-HanderaCoord(2),y2=y-HanderaCoord(4),y3=y-HanderaCoord(6); ! ! if(graphPrefs.functype==graph_param){ ! k=(firstVisible+i)/2; ! }else k=i; ! #ifdef SONY_SDK ! if(gHrMode == hrSony) { ! x1*=2; x2*=2; x3*=2; ! y1*=2; y2*=2; y3*=2; ! } ! else ! #endif ! if(gHrMode == hrPalm) { ! UInt16 save = WinSetCoordinateSystem(kCoordinatesNative); ! x1 = WinScaleCoord(x1, true); ! y1 = WinScaleCoord(y1, true); ! x2 = WinScaleCoord(x2, true); ! y2 = WinScaleCoord(y2, true); ! x3 = WinScaleCoord(x3, true); ! y3 = WinScaleCoord(y3, true); ! WinSetCoordinateSystem(save); ! } ! graph_setcolor(k); ! switch (graphPrefs.grType[k]) { ! case 0: ! clie_drawpixel(x1,y1); ! clie_drawpixel(x2,y2); ! clie_drawpixel(x3,y3); ! break; ! case 2: ! clie_drawpixel(x1,y1); ! clie_drawline(x2,y1,x2,y2); ! clie_drawline(x3,y1,x3,y3); ! break; ! default: ! clie_drawline(x1,y1,x3,y3); ! break; } - graph_unsetcolor(); - } } } --- 563,611 ---- #endif ! static void draw_grType(FormType *frm) IFACE; static void draw_grType(FormType *frm) { Int8 i,k; ! Coord x, y, x1, x2, x3, y1, y2, y3; RectangleType bounds; ! for (i=0; i<6; i++) { ! if (graphPrefs.functype != graph_param || i % 2 == 0) { ! FrmGetObjectBounds(frm, FrmGetObjectIndex(frm,grType1+i), &bounds); ! WinEraseRectangle(&bounds, 0); ! WinDrawRectangleFrame(roundFrame, &bounds); ! x = bounds.topLeft.x; ! y = bounds.topLeft.y + bounds.extent.y - 1; ! x1 = x + HanderaCoord(3); ! x2 = x + HanderaCoord(6); ! x3 = x + HanderaCoord(9); ! y1 = y - HanderaCoord(1); ! y2 = y - HanderaCoord(3); ! y3 = y - HanderaCoord(5); ! if (graphPrefs.functype == graph_param) { ! k = (firstVisible + i) / 2; ! } ! else ! k = i; ! graph_setcolor(k); ! switch (graphPrefs.grType[k]) { ! case 0: ! WinDrawLine(x1, y2, x1, y2); ! WinDrawLine(x2 ,y2, x2, y2); ! WinDrawLine(x3, y2, x3, y2); ! break; ! case 2: ! WinDrawLine(x1, y1, x1, y1); ! WinDrawLine(x2, y1, x2, y2); ! WinDrawLine(x3, y1, x3, y3); ! break; ! default: ! WinDrawLine(x1, y2, x3, y2); ! break; ! } ! graph_unsetcolor(); } } } Index: graph.rcp.in =================================================================== RCS file: /cvsroot/easycalc/easycalc/graph.rcp.in,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** graph.rcp.in 27 Sep 2006 09:42:41 -0000 1.32 --- graph.rcp.in 5 Oct 2006 15:15:44 -0000 1.33 *************** *** 40,51 **** TITLE "$$SETUP GRAPHS" ! TABLE ID grSetupTable AT (5 15 130 70) ROWS 6 COLUMNS 2 COLUMNWIDTHS 20 110 ! BUTTON " " ID grType1 AT (139 16 13 9) NOFRAME ! BUTTON " " ID grType2 AT (139 27 13 9) NOFRAME NONUSABLE ! BUTTON " " ID grType3 AT (139 38 13 9) NOFRAME ! BUTTON " " ID grType4 AT (139 49 13 9) NOFRAME NONUSABLE ! BUTTON " " ID grType5 AT (139 60 13 9) NOFRAME ! BUTTON " " ID grType6 AT (139 71 13 9) NOFRAME NONUSABLE BUTTON "$$DONE" ID grSetupDone AT (5 88 40 12) --- 40,51 ---- TITLE "$$SETUP GRAPHS" ! TABLE ID grSetupTable AT (5 15 132 70) ROWS 6 COLUMNS 2 COLUMNWIDTHS 20 112 ! BUTTON " " ID grType1 AT (139 17 13 7) NOFRAME ! BUTTON " " ID grType2 AT (139 28 13 7) NOFRAME NONUSABLE ! BUTTON " " ID grType3 AT (139 39 13 7) NOFRAME ! BUTTON " " ID grType4 AT (139 50 13 7) NOFRAME NONUSABLE ! BUTTON " " ID grType5 AT (139 61 13 7) NOFRAME ! BUTTON " " ID grType6 AT (139 72 13 7) NOFRAME NONUSABLE BUTTON "$$DONE" ID grSetupDone AT (5 88 40 12) |