|
From: <kr_...@us...> - 2003-02-03 16:53:45
|
Update of /cvsroot/htoolkit/port/src/include
In directory sc8-pr-cvs1:/tmp/cvs-serv13436/port/src/include
Modified Files:
Canvas.h Types.h
Log Message:
The implementation of Canvas are changed for better performance. setPenColor, setPenBackColor, setPenHatchStyle and all other setPen* functions are replaced with single function which changes all attributes of Canvas in single step.
Index: Canvas.h
===================================================================
RCS file: /cvsroot/htoolkit/port/src/include/Canvas.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** Canvas.h 30 Jan 2003 20:43:25 -0000 1.5
--- Canvas.h 3 Feb 2003 16:53:41 -0000 1.6
***************
*** 10,13 ****
--- 10,15 ----
extern void osDoneCanvas (CanvasHandle);
+ extern void osChangeCanvasPen(int,int,unsigned int,unsigned int,int,int,int,int,unsigned char *,BOOL,int,BitmapHandle,FontHandle,CanvasHandle);
+
/* Operations to create, modify, and destroy polygon shapes.
*/
***************
*** 16,30 ****
extern void osDeletePolygon(PolygonHandle);
- extern void osSetPenSize (int,CanvasHandle);
- extern void osSetPenColor (unsigned int,CanvasHandle);
- extern void osSetBackColor (unsigned int,CanvasHandle);
- extern void osSetPenJoinStyle(int joinStyle, CanvasHandle canvas);
- extern void osSetPenCapStyle(int capStyle, CanvasHandle canvas);
- extern void osSetPenLineStyle(int lineStyle, int stylesCount, unsigned char *stylesPtr, CanvasHandle canvas);
- extern void osSetPenFunction(int function, CanvasHandle canvas);
- extern void osSetBkDrawMode(BOOL mode, CanvasHandle canvas);
- extern void osSetPenHatchStyle(int hatchStyle, BitmapHandle patBmp, CanvasHandle canvas);
- extern void osSetFont (FontHandle,CanvasHandle canvas);
-
extern void osRotateCanvas(double angle, CanvasHandle canvas);
extern void osScaleCanvas(double dScaleX, double dScaleY, CanvasHandle canvas);
--- 18,21 ----
***************
*** 32,68 ****
extern void osTranslateCanvas(double dDeltaX, double dDeltaY, CanvasHandle canvas);
- extern void osUndrawPoint (int x, int y, CanvasHandle canvas);
extern void osDrawPoint (int,int,CanvasHandle canvas);
extern void osDrawLine (int,int,int,int,CanvasHandle canvas);
- extern void osUndrawLine(int,int,int,int,CanvasHandle canvas);
extern void osDrawChar (int,int,char,CanvasHandle canvas);
- extern void osUndrawChar (int,int,char,CanvasHandle canvas);
extern void osDrawString (int,int,char*,CanvasHandle canvas);
- extern void osUndrawString (int,int,char*,CanvasHandle canvas);
extern void osDrawRect (int,int,int,int,CanvasHandle canvas);
- extern void osUndrawRect (int,int,int,int,CanvasHandle canvas);
extern void osFillRect (int,int,int,int,CanvasHandle canvas);
- extern void osEraseRect (int,int,int,int,CanvasHandle canvas);
extern void osDrawOval (int,int,int,int,CanvasHandle canvas);
- extern void osUndrawOval (int,int,int,int,CanvasHandle canvas);
extern void osFillOval (int,int,int,int,CanvasHandle canvas);
- extern void osEraseOval (int,int,int,int,CanvasHandle canvas);
extern void osDrawCurve (int x0, int y0, int x1, int y1, float from, float to, BOOL clockwise, CanvasHandle canvas);
- extern void osUndrawCurve (int x0, int y0, int x1, int y1, float from, float to, BOOL clockwise, CanvasHandle canvas);
extern void osFillCurve (int x0, int y0, int x1, int y1, float from, float to, BOOL clockwise, CanvasHandle canvas);
- extern void osEraseCurve (int x0, int y0, int x1, int y1, float from, float to, BOOL clockwise, CanvasHandle canvas);
extern void osDrawPolyline (PolygonHandle,CanvasHandle canvas);
- extern void osUndrawPolyline (PolygonHandle,CanvasHandle canvas);
extern void osDrawPolygon (PolygonHandle,CanvasHandle canvas);
- extern void osUndrawPolygon (PolygonHandle,CanvasHandle canvas);
extern void osFillPolygon (PolygonHandle,CanvasHandle canvas);
- extern void osErasePolygon (PolygonHandle,CanvasHandle canvas);
extern void osDrawBitmap (int,int,BitmapHandle,CanvasHandle canvas);
--- 23,46 ----
Index: Types.h
===================================================================
RCS file: /cvsroot/htoolkit/port/src/include/Types.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Types.h 27 Jan 2003 21:18:34 -0000 1.3
--- Types.h 3 Feb 2003 16:53:41 -0000 1.4
***************
*** 41,62 ****
HBITMAP hBufferBitmap;
BOOL bInvalidated;
! HPEN theNormalPen;
! HPEN theBackPen;
! HBRUSH theNormalBrush;
! HBRUSH theBackBrush;
HFONT theFont;
- int penSize;
- int joinStyle;
- int capStyle;
- int lineStyle;
DWORD stylesCount;
DWORD *stylesPtr;
- BitmapHandle patBmp;
- int hatchStyle;
- COLORREF penColor;
- COLORREF backColor;
-
- int lastActivity;
} *CanvasHandle;
--- 41,50 ----
HBITMAP hBufferBitmap;
BOOL bInvalidated;
! HPEN thePen;
! HBRUSH theBrush;
HFONT theFont;
DWORD stylesCount;
DWORD *stylesPtr;
} *CanvasHandle;
***************
*** 102,111 ****
{
GdkDrawable *drawable;
! GdkGC *theDrawGC, *theEraseGC, *theFillGC, *theUnfillGC, *theTextGC;
FontHandle theFont;
- gint penSize;
- int joinStyle;
- int capStyle;
- int lineStyle;
gint lineCustomCount;
gint8 *lineCustomDashes;
--- 90,95 ----
{
GdkDrawable *drawable;
! GdkGC *theDrawGC, *theFillGC, *theTextGC;
FontHandle theFont;
gint lineCustomCount;
gint8 *lineCustomDashes;
|