diff options
Diffstat (limited to 'tkwin')
-rwxr-xr-x | tkwin/tkwin32.h | 14 | ||||
-rwxr-xr-x | tkwin/win32lib.C | 77 | ||||
-rwxr-xr-x | tkwin/win32lib.h | 9 |
3 files changed, 66 insertions, 34 deletions
diff --git a/tkwin/tkwin32.h b/tkwin/tkwin32.h index 7577b2a..c043c35 100755 --- a/tkwin/tkwin32.h +++ b/tkwin/tkwin32.h @@ -110,26 +110,28 @@ class TkWin32 { double getPageScale() {return pageScale;} const Matrix& getCanvasToPage() {return canvasToPage;} - + */ void begin(); void end(); - void color(int red, int green, int blue); + void color(int, int, int); void width(float); void dash(float*,int); void font(Tk_Font); void clip(float, float, float, float); + void newpath(); + void stroke(); + void fill(); + void arc(float, float, float, float, float); + void curve(float, float, float, float, float, float, float, float); + void drawText(float, float, float, const char*); void drawLines(float*, float*, int); void fillPolygon(float*, float*, int); void drawArc(float, float, float, float, float); - void fillArc(float, float, float, float, float); - void drawCurve(float, float, float, float, float, float, float, float); - void fillCurve(float, float, float, float, float, float, float, float); void bitmapCreate(void*, int, int, float, float, float, float); - */ }; extern TkWin32* tkwin32; diff --git a/tkwin/win32lib.C b/tkwin/win32lib.C index 0e55117..5ba7360 100755 --- a/tkwin/win32lib.C +++ b/tkwin/win32lib.C @@ -85,6 +85,58 @@ void win32Clip(Vector v, Vector s) */ } +void win32NewPath() +{ + /* + if (tkwin32) { + tkwin32->newpath(); + } + */ +} + +void win32Stroke() +{ + /* + if (tkwin32) { + tkwin32->stroke(); + } + */ +} + +void win32Fill() +{ + /* + if (tkwin32) { + tkwin32->fill(); + } + */ +} + +void win32Arc(Vector v, float rad, float ang1, float ang2) +{ + /* + if (tkwin32) { + Vector vv = v*tkwin32->getCanvasToPage(); + tkwin32->arc(vv[0], vv[1], rad, ang1, ang2); + } + */ +} + +void win32Curve(Vector v0, Vector t0, Vector t1, Vector v1) +{ + /* + if (tkwin32) { + Vector vv0 = v0*tkwin32->getCanvasToPage(); + Vector tt0 = t0*tkwin32->getCanvasToPage(); + Vector tt1 = t1*tkwin32->getCanvasToPage(); + Vector vv1 = v1*tkwin32->getCanvasToPage(); + + tkwin32->curve(vv0[0], vv0[1], tt0[0], tt0[1], + tt1[0], tt1[1], vv1[0], vv1[1]); + } + */ +} + void win32DrawText(Vector v, float ang, const char* text) { /* @@ -160,17 +212,6 @@ void win32DrawArc(Vector v, float rad, float ang1, float ang2) */ } -void win32FillArc(Vector v, float rad, float ang1, float ang2) -{ - /* - if (tkwin32) { - Vector vv = v*tkwin32->getCanvasToPage(); - float rr = rad*tkwin32->getPageScale(); - tkwin32->fillArc(vv[0], vv[1], rr, ang1, ang2); - } - */ -} - void win32DrawCurve(Vector v0, Vector t0, Vector t1, Vector v1) { /* @@ -185,20 +226,6 @@ void win32DrawCurve(Vector v0, Vector t0, Vector t1, Vector v1) */ } -void win32FillCurve(Vector v0, Vector t0, Vector t1, Vector v1) -{ - /* - if (tkwin32) { - Vector vv0 = v0*tkwin32->getCanvasToPage(); - Vector tt0 = t0*tkwin32->getCanvasToPage(); - Vector tt1 = t1*tkwin32->getCanvasToPage(); - Vector vv1 = v1*tkwin32->getCanvasToPage(); - tkwin32->fillCurve(vv0[0], vv0[1], tt0[0], tt0[1], - tt1[0], tt1[1], vv1[0], vv1[1]); - } - */ -} - void win32BitmapCreate(void* img, int width, int height, const Vector& v, const Vector& s) { diff --git a/tkwin/win32lib.h b/tkwin/win32lib.h index d950498..f28375a 100755 --- a/tkwin/win32lib.h +++ b/tkwin/win32lib.h @@ -21,14 +21,17 @@ void win32Dash(float*,int); void win32Font(Tk_Font); void win32Clip(Vector, Vector); +void win32NewPath(); +void win32Stroke(); +void win32Fill(); +void win32Arc(Vector, float, float, float); +void win32Curve(Vector, Vector, Vector, Vector); + void win32DrawText(Vector, float, const char*); void win32DrawLine(Vector, Vector); void win32DrawLines(Vector*, int); void win32FillPolygon(Vector*, int); void win32DrawArc(Vector, float, float, float); -void win32FillArc(Vector, float, float, float); -void win32DrawCurve(Vector, Vector, Vector, Vector); -void win32FillCurve(Vector, Vector, Vector, Vector); void win32BitmapCreate(void*, int, int, const Vector&, const Vector&); |