1 /** \file 2 * \brief Private CD declarations 3 * 4 * See Copyright Notice in cd.h 5 */ 6 7 module cd.private_; 8 9 import cd.cd; 10 import core.stdc.stdarg; 11 12 extern (C) @safe nothrow: 13 14 /* All context canvas must have at least the base canvas pointer. */ 15 struct _cdCtxCanvasBase 16 { 17 cdCanvas* canvas; 18 } 19 alias cdCtxCanvasBase = _cdCtxCanvasBase; 20 21 struct _cdCtxCanvas; 22 alias cdCtxCanvas = _cdCtxCanvas; 23 struct _cdCtxImage; 24 alias cdCtxImage = _cdCtxImage; 25 26 struct _cdVectorFont; 27 alias cdVectorFont = _cdVectorFont; 28 struct _cdSimulation; 29 alias cdSimulation = _cdSimulation; 30 31 struct _cdPoint 32 { 33 int x, y; 34 } 35 alias cdPoint = _cdPoint; 36 37 struct _cdfPoint 38 { 39 double x, y; 40 } 41 alias cdfPoint = _cdfPoint; 42 43 struct _cdRect 44 { 45 int xmin, xmax, ymin, ymax; 46 } 47 alias cdRect = _cdRect; 48 49 struct _cdfRect 50 { 51 double xmin, xmax, ymin, ymax; 52 } 53 alias cdfRect = _cdfRect; 54 55 struct _cdAttribute 56 { 57 const(char) *name; 58 59 /* can be NULL one of them */ 60 void function(cdCtxCanvas* ctxcanvas, char* data) set; 61 char* function(cdCtxCanvas* ctxcanvas) get; 62 } 63 alias cdAttribute = _cdAttribute; 64 65 struct _cdImage 66 { 67 int w, h; 68 cdCtxImage* ctximage; 69 70 /* can NOT be NULL */ 71 void function(cdCtxCanvas* ctxcanvas, cdCtxImage* ctximage, int x, int y) cxGetImage; 72 void function(cdCtxCanvas* ctxcanvas, cdCtxImage* ctximage, int x, int y, int xmin, int xmax, int ymin, int ymax) cxPutImageRect; 73 void function(cdCtxImage* ctximage) cxKillImage; 74 }; 75 76 struct _cdContext 77 { 78 ulong caps; /* canvas capabilities, combination of CD_CAP_* */ 79 int type; /* context type WINDOW, DEVICE, IMAGE or FILE, combined with PLUS */ 80 81 /* can NOT be NULL */ 82 void function(cdCanvas* canvas, void *data) cxCreateCanvas; 83 void function(cdCanvas* canvas) cxInitTable; 84 85 /* can be NULL */ 86 int function(cdCanvas* canvas, int xmin, int xmax, int ymin, int ymax, void *data) cxPlay; 87 int function(int cb, cdCallback func) cxRegisterCallback; 88 }; 89 90 struct _cdCanvas 91 { 92 char[2] signature; /* must be "CD" */ 93 94 /* can NOT be NULL */ 95 void function(cdCtxCanvas* ctxcanvas, int x, int y, long color) cxPixel; 96 void function(cdCtxCanvas* ctxcanvas, int x1, int y1, int x2, int y2) cxLine; 97 void function(cdCtxCanvas* ctxcanvas, int mode, cdPoint* points, int n) cxPoly; 98 void function(cdCtxCanvas* ctxcanvas, int xmin, int xmax, int ymin, int ymax) cxRect; 99 void function(cdCtxCanvas* ctxcanvas, int xmin, int xmax, int ymin, int ymax) cxBox; 100 void function(cdCtxCanvas* ctxcanvas, int xc, int yc, int w, int h, double angle1, double angle2) cxArc; 101 void function(cdCtxCanvas* ctxcanvas, int xc, int yc, int w, int h, double angle1, double angle2) cxSector; 102 void function(cdCtxCanvas* ctxcanvas, int xc, int yc, int w, int h, double angle1, double angle2) cxChord; 103 void function(cdCtxCanvas* ctxcanvas, int x, int y, const(char) *s, int len) cxText; 104 void function(cdCtxCanvas* ctxcanvas) cxKillCanvas; 105 int function(cdCtxCanvas* ctxcanvas, const(char) *type_face, int style, int size) cxFont; 106 void function(cdCtxCanvas* ctxcanvas, int iw, int ih, const(ubyte) *index, const(long) *colors, int x, int y, int w, int h, int xmin, int xmax, int ymin, int ymax) cxPutImageRectMap; 107 108 /* default implementation uses the simulation driver */ 109 void function(cdCtxCanvas* ctxcanvas, int *max_width, int *height, int *ascent, int *descent) cxGetFontDim; 110 void function(cdCtxCanvas* ctxcanvas, const(char) *s, int len, int *width, int *height) cxGetTextSize; 111 112 /* all the following function pointers can be NULL */ 113 114 void function(cdCtxCanvas* ctxcanvas) cxFlush; 115 void function(cdCtxCanvas* ctxcanvas) cxClear; 116 117 void function(cdCtxCanvas* ctxcanvas, double x, double y, long color) cxFPixel; 118 void function(cdCtxCanvas* ctxcanvas, double x1, double y1, double x2, double y2) cxFLine; 119 void function(cdCtxCanvas* ctxcanvas, int mode, cdfPoint* points, int n) cxFPoly; 120 void function(cdCtxCanvas* ctxcanvas, double xmin, double xmax, double ymin, double ymax) cxFRect; 121 void function(cdCtxCanvas* ctxcanvas, double xmin, double xmax, double ymin, double ymax) cxFBox; 122 void function(cdCtxCanvas* ctxcanvas, double xc, double yc, double w, double h, double angle1, double angle2) cxFArc; 123 void function(cdCtxCanvas* ctxcanvas, double xc, double yc, double w, double h, double angle1, double angle2) cxFSector; 124 void function(cdCtxCanvas* ctxcanvas, double xc, double yc, double w, double h, double angle1, double angle2) cxFChord; 125 void function(cdCtxCanvas* ctxcanvas, double x, double y, const(char) *s, int len) cxFText; 126 127 int function(cdCtxCanvas* ctxcanvas, int mode) cxClip; 128 void function(cdCtxCanvas* ctxcanvas, int xmin, int xmax, int ymin, int ymax) cxClipArea; 129 void function(cdCtxCanvas* ctxcanvas, double xmin, double xmax, double ymin, double ymax) cxFClipArea; 130 int function(cdCtxCanvas* ctxcanvas, int opacity) cxBackOpacity; 131 int function(cdCtxCanvas* ctxcanvas, int mode) cxWriteMode; 132 int function(cdCtxCanvas* ctxcanvas, int style) cxLineStyle; 133 int function(cdCtxCanvas* ctxcanvas, int width) cxLineWidth; 134 int function(cdCtxCanvas* ctxcanvas, int join) cxLineJoin; 135 int function(cdCtxCanvas* ctxcanvas, int cap) cxLineCap; 136 int function(cdCtxCanvas* ctxcanvas, int style) cxInteriorStyle; 137 int function(cdCtxCanvas* ctxcanvas, int style) cxHatch; 138 void function(cdCtxCanvas* ctxcanvas, int w, int h, const(ubyte) *stipple) cxStipple; 139 void function(cdCtxCanvas* ctxcanvas, int w, int h, const(long) *pattern) cxPattern; 140 int function(cdCtxCanvas* ctxcanvas, const(char) * font) cxNativeFont; 141 int function(cdCtxCanvas* ctxcanvas, int alignment) cxTextAlignment; 142 double function(cdCtxCanvas* ctxcanvas, double angle) cxTextOrientation; 143 void function(cdCtxCanvas* ctxcanvas, int n, const(long) *palette, int mode) cxPalette; 144 long function(cdCtxCanvas* ctxcanvas, long color) cxBackground; 145 long function(cdCtxCanvas* ctxcanvas, long color) cxForeground; 146 void function(cdCtxCanvas* ctxcanvas, const(double) * matrix) cxTransform; 147 148 void function(cdCtxCanvas* ctxcanvas, ubyte *r, ubyte *g, ubyte *b, int x, int y, int w, int h) cxGetImageRGB; 149 void function(cdCtxCanvas* ctxcanvas, int iw, int ih, const(ubyte) *r, const(ubyte) *g, const(ubyte) *b, int x, int y, int w, int h, int xmin, int xmax, int ymin, int ymax) cxPutImageRectRGB; 150 void function(cdCtxCanvas* ctxcanvas, int iw, int ih, const(ubyte) *r, const(ubyte) *g, const(ubyte) *b, const(ubyte) *a, int x, int y, int w, int h, int xmin, int xmax, int ymin, int ymax) cxPutImageRectRGBA; 151 152 void function(cdCtxCanvas* ctxcanvas, int iw, int ih, const(ubyte) * r, const(ubyte) * g, const(ubyte) * b, double x, double y, double w, double h, int xmin, int xmax, int ymin, int ymax) cxFPutImageRectRGB; 153 void function(cdCtxCanvas* ctxcanvas, int iw, int ih, const(ubyte) * r, const(ubyte) * g, const(ubyte) * b, const(ubyte) * a, double x, double y, double w, double h, int xmin, int xmax, int ymin, int ymax) cxFPutImageRectRGBA; 154 void function(cdCtxCanvas* ctxcanvas, int iw, int ih, const(ubyte) * index, const(long) * colors, double x, double y, double w, double h, int xmin, int xmax, int ymin, int ymax) cxFPutImageRectMap; 155 156 void function(cdCtxCanvas* ctxcanvas, int xmin, int xmax, int ymin, int ymax, int dx, int dy) cxScrollArea; 157 158 cdCtxImage* function(cdCtxCanvas* ctxcanvas, int w, int h) cxCreateImage; 159 void function(cdCtxImage* ctximage) cxKillImage; 160 void function(cdCtxCanvas* ctxcanvas, cdCtxImage* ctximage, int x, int y) cxGetImage; 161 void function(cdCtxCanvas* ctxcanvas, cdCtxImage* ctximage, int x, int y, int xmin, int xmax, int ymin, int ymax) cxPutImageRect; 162 163 void function(cdCtxCanvas* ctxcanvas) cxNewRegion; 164 int function(cdCtxCanvas* ctxcanvas, int x, int y) cxIsPointInRegion; 165 void function(cdCtxCanvas* ctxcanvas, int x, int y) cxOffsetRegion; 166 void function(cdCtxCanvas* ctxcanvas, int *xmin, int *xmax, int *ymin, int *ymax) cxGetRegionBox; 167 168 int function(cdCtxCanvas* ctxcanvas) cxActivate; 169 void function(cdCtxCanvas* ctxcanvas) cxDeactivate; 170 171 /* the driver must update these, when the canvas is created and 172 whenever the canvas change its size or bpp. */ 173 int w,h; /* size in pixels */ /**** pixel = mm * res ****/ 174 double w_mm, h_mm; /* size in mm */ /**** mm = pixel / res ****/ 175 double xres, yres; /* resolution in pixels/mm */ /**** res = pixel / mm ****/ 176 int bpp; /* number of bits per pixel */ 177 int invert_yaxis; /* invert Y coordinates before calling the driver, 178 used only when the native Y axis orientation is top-bottom "!(cap&CD_CAP_YAXIS)". 179 It is turned off by the driver if native transformation matrix is used. */ 180 double[6] matrix; 181 int use_matrix; 182 183 /* clipping attributes */ 184 int clip_mode; 185 cdRect clip_rect; 186 cdfRect clip_frect; 187 int clip_poly_n; 188 cdPoint* clip_poly; /* only defined if integer polygon created, if exist clip_fpoly is NULL, and ->Poly exists */ 189 cdfPoint* clip_fpoly; /* only defined if real polygon created, if exist clip_poly is NULL, and ->fPoly exists */ 190 191 /* clipping region attributes */ 192 int new_region; 193 int combine_mode; 194 195 /* color attributes */ 196 long foreground, background; 197 int back_opacity, write_mode; 198 199 /* primitive attributes */ 200 int mark_type, mark_size; 201 202 int line_style, line_width; 203 int line_cap, line_join; 204 int* line_dashes; 205 int line_dashes_count; 206 207 int interior_style, hatch_style; 208 int fill_mode; 209 210 char[1024] font_type_face; 211 int font_style, font_size; 212 int text_alignment; 213 double text_orientation; 214 char[1024] native_font; 215 216 int pattern_w, pattern_h, pattern_size; 217 long* pattern; 218 int stipple_w, stipple_h, stipple_size; 219 ubyte* stipple; 220 221 /* origin */ 222 int use_origin; 223 cdPoint origin; /* both points contains the same coordinate always */ 224 cdfPoint forigin; 225 226 /* last polygon */ 227 int poly_mode, 228 poly_n, /* current number of vertices */ 229 poly_size, fpoly_size; /* allocated number of vertices, only increases */ 230 cdPoint* poly; /* used during an integer polygon creation */ 231 cdfPoint* fpoly; /* used during an real polygon creation, only if ->cxFPoly exists */ 232 int use_fpoly; 233 234 /* last path */ 235 int path_n, /* current number of actions */ 236 path_size; /* allocated number of actions, only increases */ 237 int* path; /* used during path creation */ 238 int path_arc_index; /* used for arc */ 239 240 /* simulation flags */ 241 int sim_mode; 242 243 /* WC */ 244 double s, sx, tx, sy, ty; /* Transform Window -> Viewport (scale+translation)*/ 245 cdfRect window; /* Window in WC */ 246 cdRect viewport; /* Viewport in pixels */ 247 248 cdAttribute*[50] attrib_list; 249 int attrib_n; 250 251 cdVectorFont* vector_font; 252 cdSimulation* simulation; 253 cdCtxCanvas* ctxcanvas; 254 cdContext* context; 255 256 void* userdata; 257 }; 258 259 enum{CD_BASE_WIN, CD_BASE_X, CD_BASE_GDK, CD_BASE_HAIKU}; 260 int cdBaseDriver(); 261 262 /***************/ 263 /* attributes */ 264 /***************/ 265 void cdRegisterAttribute(cdCanvas* canvas, cdAttribute* attrib); 266 void cdUpdateAttributes(cdCanvas* canvas); 267 268 /***************/ 269 /* vector font */ 270 /***************/ 271 cdVectorFont* cdCreateVectorFont(cdCanvas* canvas); 272 void cdKillVectorFont(cdVectorFont* vector_font_data); 273 274 /**********/ 275 /* WC */ 276 /**********/ 277 void wdSetDefaults(cdCanvas* canvas); 278 279 /********************/ 280 /* Context Plus */ 281 /********************/ 282 void cdInitContextPlusList(cdContext** ctx_list); 283 cdContext* cdGetContextPlus(int ctx); 284 enum{CD_CTXPLUS_NATIVEWINDOW, CD_CTXPLUS_IMAGE, CD_CTXPLUS_DBUFFER, CD_CTXPLUS_PRINTER, CD_CTXPLUS_EMF, CD_CTXPLUS_CLIPBOARD}; 285 enum CD_CTXPLUS_COUNT = 6; 286 enum CD_CTX_PLUS = 0xFF00; /* to combine with context type */ 287 288 /*************/ 289 /* utilities */ 290 /*************/ 291 int cdRound(double x); 292 int cdCheckBoxSize(int *xmin, int *xmax, int *ymin, int *ymax); 293 int cdfCheckBoxSize(double *xmin, double *xmax, double *ymin, double *ymax); 294 void cdNormalizeLimits(int w, int h, int *xmin, int *xmax, int *ymin, int *ymax); 295 int cdGetFileName(const(char) * strdata, char* filename); 296 int cdStrEqualNoCase(const(char) * str1, const(char) * str2); 297 int cdStrEqualNoCasePartial(const(char) * str1, const(char) * str2); 298 int cdStrLineCount(const(char) * str); 299 char* cdStrDup(const(char) * str); 300 char* cdStrDupN(const(char) * str, int len); 301 int cdStrIsAscii(const(char) * str); 302 void cdSetPaperSize(int size, double *w_pt, double *h_pt); 303 int cdGetFontFileName(const(char) * type_face, char* filename); 304 int cdGetFontFileNameDefault(const(char) *type_face, int style, char* filename); 305 int cdGetFontFileNameSystem(const(char) *type_face, int style, char* filename); 306 int cdStrTmpFileName(char* filename); 307 308 void cdPoly(cdCanvas* canvas, int mode, cdPoint* points, int n); 309 310 void cdGetArcBox(int xc, int yc, int w, int h, double a1, double a2, int *xmin, int *xmax, int *ymin, int *ymax); 311 int cdGetArcPathF(const(cdPoint) * poly, double *xc, double *yc, double *w, double *h, double *a1, double *a2); 312 int cdfGetArcPath(const(cdfPoint) * poly, double *xc, double *yc, double *w, double *h, double *a1, double *a2); 313 int cdGetArcPath(const(cdPoint) * poly, int *xc, int *yc, int *w, int *h, double *a1, double *a2); 314 void cdGetArcStartEnd(int xc, int yc, int w, int h, double a1, double a2, int *x1, int *y1, int *x2, int *y2); 315 void cdfGetArcStartEnd(double xc, double yc, double w, double h, double a1, double a2, double *x1, double *y1, double *x2, double *y2); 316 317 pragma(inline, true) { 318 319 bool _cdCheckCanvas(T)(T _canvas) { 320 return (_canvas!=NULL && (cast(ubyte*)_canvas)[0] == 'C' && (cast(ubyte*)_canvas)[1] == 'D'); 321 } 322 323 void _cdSwapInt(T, U)(T _a, U _b) { 324 int _c=_a;_a=_b;_b=_c; 325 } 326 327 void _cdSwapDouble(T, U)(T _a, U _b) { 328 double _c=_a;_a=_b;_b=_c; 329 } 330 331 int _cdRound(T)(T _x) { 332 return (cast(int)(_x < 0? (_x-0.5): (_x+0.5))); 333 } 334 335 auto _cdRotateHatch(T)(T _x) { 336 return ((_x) = ((_x)<< 1) | ((_x)>>7)); 337 } 338 339 auto _cdInvertYAxis(T, U)(T _canvas, U _y) { 340 return (_canvas.h - (_y) - 1); 341 } 342 343 } 344 345 346 /******************/ 347 /* Transformation */ 348 /******************/ 349 void cdMatrixTransformPoint(double* matrix, int x, int y, int *rx, int *ry); 350 void cdfMatrixTransformPoint(double* matrix, double x, double y, double *rx, double *ry); 351 void cdMatrixMultiply(const(double) * matrix, double* mul_matrix); 352 void cdMatrixInverse(const(double) * matrix, double* inv_matrix); 353 void cdfRotatePoint(cdCanvas* canvas, double x, double y, double cx, double cy, double *rx, double *ry, double sin_theta, double cos_theta); 354 void cdRotatePoint(cdCanvas* canvas, int x, int y, int cx, int cy, int *rx, int *ry, double sin_teta, double cos_teta); 355 void cdRotatePointY(cdCanvas* canvas, int x, int y, int cx, int cy, int *ry, double sin_theta, double cos_theta); 356 void cdfRotatePointY(cdCanvas* canvas, double x, double y, double cx, double cy, double *ry, double sin_theta, double cos_theta); 357 void cdTextTranslatePoint(cdCanvas* canvas, int x, int y, int w, int h, int baseline, int *rx, int *ry); 358 void cdfTextTranslatePoint(cdCanvas* canvas, double x, double y, int w, int h, int baseline, double *rx, double *ry); 359 void cdMovePoint(int *x, int *y, double dx, double dy, double sin_theta, double cos_theta); 360 void cdfMovePoint(double *x, double *y, double dx, double dy, double sin_theta, double cos_theta); 361 362 /*************/ 363 /* Fonts */ 364 /*************/ 365 int cdParsePangoFont(const(char) *nativefont, char *type_face, int *style, int *size); 366 int cdParseIupWinFont(const(char) *nativefont, char *type_face, int *style, int *size); 367 int cdParseXWinFont(const(char) *nativefont, char *type_face, int *style, int *size); 368 int cdGetFontSizePixels(cdCanvas* canvas, int size); 369 int cdGetFontSizePoints(cdCanvas* canvas, int size); 370 371 /* Replacements for Font using estimation */ 372 /* cdfontex.c */ 373 void cdgetfontdimEX(cdCtxCanvas* ctxcanvas, int *max_width, int *height, int *ascent, int *descent); 374 void cdgettextsizeEX(cdCtxCanvas* ctxcanvas, const(char) *s, int len, int *width, int *height); 375 376 /****************/ 377 /* For Images */ 378 /****************/ 379 ubyte cdZeroOrderInterpolation(int width, int height, const(ubyte) *map, double xl, double yl); 380 ubyte cdBilinearInterpolation(int width, int height, const(ubyte) *map, double xl, double yl); 381 void cdImageRGBInitInverseTransform(int w, int h, int xmin, int xmax, int ymin, int ymax, double *xfactor, double *yfactor, const(double) * matrix, double* inv_matrix); 382 void cdImageRGBInverseTransform(int t_x, int t_y, double *i_x, double *i_y, double xfactor, double yfactor, int xmin, int ymin, int x, int y, double *inv_matrix); 383 void cdImageRGBCalcDstLimits(cdCanvas* canvas, int x, int y, int w, int h, int *xmin, int *xmax, int *ymin, int *ymax, int* rect); 384 void cdRGB2Gray(int width, int height, const(ubyte) * red, const(ubyte) * green, const(ubyte) * blue, ubyte* index, long *color); 385 386 pragma(inline, true) { 387 ubyte CD_ALPHA_BLEND(T, U, V)(T _src, U _dst, V _alpha) { 388 return cast(ubyte)(((_src) * (_alpha) + (_dst) * (255 - (_alpha))) / 255); 389 } 390 } 391 392 int* cdGetZoomTable(int w, int rw, int xmin); 393 int cdCalcZoom(int canvas_size, int cnv_rect_pos, int cnv_rect_size, 394 int *new_cnv_rect_pos, int *new_cnv_rect_size, 395 int img_rect_pos, int img_rect_size, 396 int *new_img_rect_pos, int *new_img_rect_size, int is_horizontal); 397 398 /**************/ 399 /* simulation */ 400 /**************/ 401 402 /* sim.c */ 403 /* simulation base driver. */ 404 cdSimulation* cdCreateSimulation(cdCanvas* canvas); 405 void cdKillSimulation(cdSimulation* simulation); 406 void cdSimulationInitText(cdSimulation* simulation); 407 408 /* sim_text.c */ 409 /* Replacements for Text and Font using FreeType library */ 410 void cdSimulationText(cdCtxCanvas* ctxcanvas, int x, int y, const(char) *s, int len); 411 int cdSimulationFont(cdCtxCanvas* ctxcanvas, const(char) *type_face, int style, int size); 412 void cdSimulationGetFontDim(cdCtxCanvas* ctxcanvas, int *max_width, int *height, int *ascent, int *descent); 413 void cdSimulationGetTextSize(cdCtxCanvas* ctxcanvas, const(char) *s, int len, int *width, int *height); 414 415 /* sim_linepolyfill.c */ 416 void cdfSimulationPoly(cdCtxCanvas* ctxcanvas, int mode, cdfPoint* fpoly, int n); 417 void cdSimulationPoly(cdCtxCanvas* ctxcanvas, int mode, cdPoint* poly, int n); 418 419 /* sim_primitives.c */ 420 /* Simulation functions that are >> independent << of the simulation base driver. */ 421 422 void cdSimMark(cdCanvas* canvas, int x, int y); 423 void cdfSimMark(cdCanvas* canvas, double x, double y); 424 void cdSimPutImageRectRGBA(cdCanvas* canvas, int iw, int ih, const(ubyte) *r, const(ubyte) *g, const(ubyte) *b, const(ubyte) *a, int x, int y, int w, int h, int xmin, int xmax, int ymin, int ymax); 425 void cdSimPutImageRectRGB(cdCanvas* canvas, int iw, int ih, const(ubyte) *r, const(ubyte) *g, const(ubyte) *b, int x, int y, int w, int h, int xmin, int xmax, int ymin, int ymax); 426 void cdfSimPutImageRectRGB(cdCanvas* canvas, int iw, int ih, const(ubyte) *r, const(ubyte) *g, const(ubyte) *b, double x, double y, double w, double h, int xmin, int xmax, int ymin, int ymax); 427 void cdfSimPutImageRectRGBA(cdCanvas* canvas, int iw, int ih, const(ubyte) *r, const(ubyte) *g, const(ubyte) *b, const(ubyte) *a, double x, double y, double w, double h, int xmin, int xmax, int ymin, int ymax); 428 429 /* All these use cdPoly. */ 430 void cdSimLine(cdCtxCanvas* ctxcanvas, int x1, int y1, int x2, int y2); 431 void cdSimRect(cdCtxCanvas* ctxcanvas, int xmin, int xmax, int ymin, int ymax); 432 void cdSimBox(cdCtxCanvas* ctxcanvas, int xmin, int xmax, int ymin, int ymax); 433 void cdSimArc(cdCtxCanvas* ctxcanvas, int xc, int yc, int width, int height, double angle1, double angle2); 434 void cdSimSector(cdCtxCanvas* ctxcanvas, int xc, int yc, int width, int height, double angle1, double angle2); 435 void cdSimChord(cdCtxCanvas* ctxcanvas, int xc, int yc, int width, int height, double angle1, double angle2); 436 void cdSimPolyBezier(cdCanvas* canvas, const(cdPoint) * points, int n); 437 void cdSimPolyPath(cdCanvas* canvas, const(cdPoint) * points, int n); 438 439 /* All these use the polygon method ->cxFPoly only. */ 440 /* can be used only by drivers that implement cxFPoly */ 441 void cdfSimLine(cdCtxCanvas* ctxcanvas, double x1, double y1, double x2, double y2); 442 void cdfSimRect(cdCtxCanvas *ctxcanvas, double xmin, double xmax, double ymin, double ymax); 443 void cdfSimBox(cdCtxCanvas *ctxcanvas, double xmin, double xmax, double ymin, double ymax); 444 void cdfSimArc(cdCtxCanvas *ctxcanvas, double xc, double yc, double width, double height, double angle1, double angle2); 445 void cdfSimSector(cdCtxCanvas *ctxcanvas, double xc, double yc, double width, double height, double angle1, double angle2); 446 void cdfSimChord(cdCtxCanvas *ctxcanvas, double xc, double yc, double width, double height, double angle1, double angle2); 447 void cdfSimPolyBezier(cdCanvas* canvas, const(cdfPoint) * points, int n); 448 void cdfSimPolyPath(cdCanvas* canvas, const(cdfPoint) * points, int n); 449