diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2017-03-27 15:59:05 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2017-03-27 15:59:05 (GMT) |
commit | 6cbd586d1439b7189e3349533ded31de37a2da43 (patch) | |
tree | 5da8091542ecd9ad7048d5f1d16afa82ad9354fe /tkmacosx/macosxlib.M | |
parent | e59c06603d7488904582b21295cdaca0cbd373f3 (diff) | |
download | blt-6cbd586d1439b7189e3349533ded31de37a2da43.zip blt-6cbd586d1439b7189e3349533ded31de37a2da43.tar.gz blt-6cbd586d1439b7189e3349533ded31de37a2da43.tar.bz2 |
macosx print
Diffstat (limited to 'tkmacosx/macosxlib.M')
-rw-r--r-- | tkmacosx/macosxlib.M | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/tkmacosx/macosxlib.M b/tkmacosx/macosxlib.M index 65e51a8..37b5e44 100644 --- a/tkmacosx/macosxlib.M +++ b/tkmacosx/macosxlib.M @@ -7,18 +7,23 @@ void macosxBegin() { + /* if (tkmacosx) tkmacosx->begin(); + */ } void macosxEnd() { + /* if (tkmacosx) tkmacosx->end(); + */ } void macosxColor(XColor* clr) { + /* if (clr) { float red = clr->red/float(USHRT_MAX); float green = clr->green/float(USHRT_MAX); @@ -27,67 +32,85 @@ void macosxColor(XColor* clr) if (tkmacosx) tkmacosx->color(red,green,blue); } + */ } void macosxWidth(float ww) { + /* if (tkmacosx) tkmacosx->width(ww); + */ } void macosxDash(float* d, int n) { + /* if (tkmacosx) tkmacosx->dash(d,n); + */ } void macosxFont(const char* f, float s) { + /* if (tkmacosx) tkmacosx->font(f,s); + */ } void macosxClip(Vector v, Vector s) { + /* if (tkmacosx) { Vector vv1 = v*tkmacosx->getCanvasToPage(); Vector vv2 = (v+s)*tkmacosx->getCanvasToPage(); Vector ss = vv2-vv1; tkmacosx->clip(vv1[0],vv1[1],ss[0],ss[1]); } + */ } void macosxNewPath() { + /* if (tkmacosx) { tkmacosx->newpath(); } + */ } void macosxStroke() { + /* if (tkmacosx) { tkmacosx->stroke(); } + */ } void macosxFill() { + /* if (tkmacosx) { tkmacosx->fill(); } + */ } void macosxArc(Vector v, float rad, float ang1, float ang2) { + /* if (tkmacosx) { Vector vv = v*tkmacosx->getCanvasToPage(); tkmacosx->arc(vv[0], vv[1], rad, ang1, ang2); } + */ } void macosxCurve(Vector v0, Vector t0, Vector t1, Vector v1) { + /* if (tkmacosx) { Vector vv0 = v0*tkmacosx->getCanvasToPage(); Vector tt0 = t0*tkmacosx->getCanvasToPage(); @@ -97,18 +120,22 @@ void macosxCurve(Vector v0, Vector t0, Vector t1, Vector v1) tkmacosx->curve(vv0[0], vv0[1], tt0[0], tt0[1], tt1[0], tt1[1], vv1[0], vv1[1]); } + */ } void macosxDrawText(Vector v, float ang, const char* text) { + /* if (tkmacosx) { Vector vv = v*tkmacosx->getCanvasToPage(); tkmacosx->drawText(vv[0], vv[1], ang, text); } + */ } void macosxDrawLine(Vector v0, Vector v1) { + /* if (tkmacosx) { Vector vv0 = v0*tkmacosx->getCanvasToPage(); Vector vv1 = v1*tkmacosx->getCanvasToPage(); @@ -124,10 +151,12 @@ void macosxDrawLine(Vector v0, Vector v1) tkmacosx->drawLines(x,y,n); } + */ } void macosxDrawLines(Vector* v, int n) { + /* if (tkmacosx) { float xx[n]; float yy[n]; @@ -141,10 +170,12 @@ void macosxDrawLines(Vector* v, int n) tkmacosx->drawLines(xx,yy,n); } + */ } void macosxFillPolygon(Vector* v, int n) { + /* if (tkmacosx) { float xx[n]; float yy[n]; @@ -158,23 +189,28 @@ void macosxFillPolygon(Vector* v, int n) tkmacosx->fillPolygon(xx,yy,n); } + */ } void macosxDrawArc(Vector v, float rad, float ang1, float ang2) { + /* if (tkmacosx) { Vector vv = v*tkmacosx->getCanvasToPage(); tkmacosx->drawArc(vv[0], vv[1], rad, ang1, ang2); } + */ } void macosxBitmapCreate(void* img, int width, int height, const Vector& v, const Vector& s) { + /* if (tkmacosx) { Vector vv1 = v*tkmacosx->getCanvasToPage(); Vector vv2 = (v+s)*tkmacosx->getCanvasToPage(); Vector ss = vv2-vv1; tkmacosx->bitmapCreate(img, width, height, vv1[0], vv1[1], ss[0], ss[1]); } + */ } |