diff options
-rwxr-xr-x | cd/include/cd_private.h | 50 |
1 files changed, 33 insertions, 17 deletions
diff --git a/cd/include/cd_private.h b/cd/include/cd_private.h index 6138f60..05395b2 100755 --- a/cd/include/cd_private.h +++ b/cd/include/cd_private.h @@ -344,35 +344,51 @@ int cdCalcZoom(int canvas_size, int cnv_rect_pos, int cnv_rect_size, /**************/ /* simulation */ /**************/ + +/* sim.c */ cdSimulation* cdCreateSimulation(cdCanvas* canvas); void cdKillSimulation(cdSimulation* simulation); +void cdSimInitText(cdSimulation* simulation); + +/* Replacements for Text and Font using FreeType library */ +/* sim_text.c */ +void cdSimTextFT(cdCtxCanvas* ctxcanvas, int x, int y, const char *s, int len); +int cdSimFontFT(cdCtxCanvas* ctxcanvas, const char *type_face, int style, int size); +void cdSimGetFontDimFT(cdCtxCanvas* ctxcanvas, int *max_width, int *height, int *ascent, int *descent); +void cdSimGetTextSizeFT(cdCtxCanvas* ctxcanvas, const char *s, int len, int *width, int *height); -/* Replacements for cdCanvas function pointers */ -void cdrectSIM(cdCtxCanvas* ctxcanvas, int xmin, int xmax, int ymin, int ymax); -void cdboxSIM(cdCtxCanvas* ctxcanvas, int xmin, int xmax, int ymin, int ymax); -void cdlineSIM(cdCtxCanvas* ctxcanvas, int x1, int y1, int x2, int y2); -void cdarcSIM(cdCtxCanvas* ctxcanvas, int xc, int yc, int width, int height, double angle1, double angle2); -void cdsectorSIM(cdCtxCanvas* ctxcanvas, int xc, int yc, int width, int height, double angle1, double angle2); -void cdchordSIM(cdCtxCanvas* ctxcanvas, int xc, int yc, int width, int height, double angle1, double angle2); -void cdpolySIM(cdCtxCanvas* ctxcanvas, int mode, cdPoint* points, int n); +/* sim_primitives.c */ -/* Simulation functions that are independent of the simulation base driver */ +/* Simulation functions that are >> independent << of the simulation base driver. */ void cdSimMark(cdCanvas* canvas, int x, int y); -void cdSimPolyBezier(cdCanvas* canvas, const cdPoint* points, int n); void cdSimPutImageRectRGBA(cdCanvas* canvas, int iw, int ih, const unsigned char *r, const unsigned char *g, const unsigned char *b, const unsigned char *a, int x, int y, int w, int h, int xmin, int xmax, int ymin, int ymax); +void cdSimPutImageRectRGB(cdCanvas* canvas, int iw, int ih, const unsigned char *r, const unsigned char *g, const unsigned char *b, int x, int y, int w, int h, int xmin, int xmax, int ymin, int ymax); + +/* Simulation functions that are >> independent << of the simulation base driver. + All use the polygon method ->cxPoly only. */ +void cdSimLine(cdCtxCanvas* ctxcanvas, int x1, int y1, int x2, int y2); +void cdSimRect(cdCtxCanvas* ctxcanvas, int xmin, int xmax, int ymin, int ymax); +void cdSimBox(cdCtxCanvas* ctxcanvas, int xmin, int xmax, int ymin, int ymax); +void cdSimArc(cdCtxCanvas* ctxcanvas, int xc, int yc, int width, int height, double angle1, double angle2); +void cdSimSector(cdCtxCanvas* ctxcanvas, int xc, int yc, int width, int height, double angle1, double angle2); +void cdSimChord(cdCtxCanvas* ctxcanvas, int xc, int yc, int width, int height, double angle1, double angle2); +void cdSimPoly(cdCtxCanvas* ctxcanvas, int mode, cdPoint* points, int n); + +void cdSimPolyBezier(cdCanvas* canvas, const cdPoint* points, int n); +void cdSimPolyPath(cdCanvas* canvas, const cdPoint* points, int n); -/* Simulation functions that are independent of the simulation base driver, - and does not checks for axis and matrix. +/* Simulation functions that are >> independent << of the simulation base driver. All use the polygon method ->cxFPoly only. */ -void cdfSimPolyBezier(cdCanvas* canvas, const cdfPoint* points, int n); +void cdfSimLine(cdCtxCanvas* ctxcanvas, double x1, double y1, double x2, double y2); void cdfSimRect(cdCtxCanvas *ctxcanvas, double xmin, double xmax, double ymin, double ymax); void cdfSimBox(cdCtxCanvas *ctxcanvas, double xmin, double xmax, double ymin, double ymax); -void cdfSimElipse(cdCtxCanvas* ctxcanvas, double xc, double yc, double width, double height, double angle1, double angle2, int sector); void cdfSimArc(cdCtxCanvas *ctxcanvas, double xc, double yc, double width, double height, double angle1, double angle2); +void cdfSimSector(cdCtxCanvas *ctxcanvas, double xc, double yc, double width, double height, double angle1, double angle2); +void cdfSimChord(cdCtxCanvas *ctxcanvas, double xc, double yc, double width, double height, double angle1, double angle2); +void cdfSimPoly(cdCtxCanvas* ctxcanvas, int mode, cdfPoint* fpoly, int n); -/* Replacements for Font using estimation */ -void cdgetfontdimEX(cdCtxCanvas* ctxcanvas, int *max_width, int *height, int *ascent, int *descent); -void cdgettextsizeEX(cdCtxCanvas* ctxcanvas, const char *s, int len, int *width, int *height); +void cdfSimPolyBezier(cdCanvas* canvas, const cdfPoint* points, int n); +void cdfSimPolyPath(cdCanvas* canvas, const cdfPoint* points, int n); #ifdef __cplusplus |