diff options
author | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2010-09-09 01:48:52 +0200 |
---|---|---|
committer | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2010-09-09 01:50:25 +0200 |
commit | e9a184546b18cf3b796bd560561f312934004c54 (patch) | |
tree | aa785af9a8d03f8ce276c9e9ecec78397005ec22 /cd/include/cd_private.h | |
parent | 92efe73791d0998536042bfab5a1babc67d168c7 (diff) |
Upgrading to CD 5.4 - and cleaning up.
Diffstat (limited to 'cd/include/cd_private.h')
-rwxr-xr-x | cd/include/cd_private.h | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/cd/include/cd_private.h b/cd/include/cd_private.h index b9a3243..6138f60 100755 --- a/cd/include/cd_private.h +++ b/cd/include/cd_private.h @@ -215,9 +215,13 @@ struct _cdCanvas cdfPoint* fpoly; /* used during an real poligon creation, only if ->fPoly exists */ int use_fpoly; + /* last path */ + int path_n, /* current number of actions */ + path_size; /* allocated number of actions, only increases */ + int* path; /* used during path creation */ + /* simulation flags */ int sim_mode; - int sim_poly; /* WC */ double s, sx, tx, sy, ty; /* Transformacao Window -> Viewport (scale+translation)*/ @@ -264,15 +268,25 @@ enum{CD_CTX_NATIVEWINDOW, CD_CTX_IMAGE, CD_CTX_DBUFFER, CD_CTX_PRINTER, CD_CTX_E /* utilities */ /*************/ int cdRound(double x); -void cdCanvasGetEllipseBox(int xc, int yc, int w, int h, double a1, double a2, int *xmin, int *xmax, int *ymin, int *ymax); int cdCheckBoxSize(int *xmin, int *xmax, int *ymin, int *ymax); int cdfCheckBoxSize(double *xmin, double *xmax, double *ymin, double *ymax); void cdNormalizeLimits(int w, int h, int *xmin, int *xmax, int *ymin, int *ymax); int cdGetFileName(const char* strdata, char* filename); int cdStrEqualNoCase(const char* str1, const char* str2); +int cdStrEqualNoCasePartial(const char* str1, const char* str2); int cdStrLineCount(const char* str); char* cdStrDup(const char* str); char* cdStrDupN(const char* str, int len); +void cdSetPaperSize(int size, double *w_pt, double *h_pt); +int cdGetFontFileName(const char* font, char* filename); + +void cdCanvasPoly(cdCanvas* canvas, int mode, cdPoint* points, int n); +void cdCanvasGetArcBox(int xc, int yc, int w, int h, double a1, double a2, int *xmin, int *xmax, int *ymin, int *ymax); +int cdCanvasGetArcPathF(cdCanvas* canvas, const cdPoint* poly, double *xc, double *yc, double *w, double *h, double *a1, double *a2); +int cdfCanvasGetArcPath(cdCanvas* canvas, const cdfPoint* poly, double *xc, double *yc, double *w, double *h, double *a1, double *a2); +int cdCanvasGetArcPath(cdCanvas* canvas, const cdPoint* poly, int *xc, int *yc, int *w, int *h, double *a1, double *a2); +void cdCanvasGetArcStartEnd(int xc, int yc, int w, int h, double a1, double a2, int *x1, int *y1, int *x2, int *y2); +void cdfCanvasGetArcStartEnd(double xc, double yc, double w, double h, double a1, double a2, double *x1, double *y1, double *x2, double *y2); #define _cdCheckCanvas(_canvas) (_canvas!=NULL && ((unsigned char*)_canvas)[0] == 'C' && ((unsigned char*)_canvas)[1] == 'D') #define _cdInvertYAxis(_canvas, _y) (_canvas->h - (_y) - 1) @@ -288,6 +302,7 @@ void cdMatrixTransformPoint(double* matrix, int x, int y, int *rx, int *ry); void cdfMatrixTransformPoint(double* matrix, double x, double y, double *rx, double *ry); void cdMatrixMultiply(const double* matrix, double* mul_matrix); void cdMatrixInverse(const double* matrix, double* inv_matrix); +void cdfRotatePoint(cdCanvas* canvas, double x, double y, double cx, double cy, double *rx, double *ry, double sin_theta, double cos_theta); void cdRotatePoint(cdCanvas* canvas, int x, int y, int cx, int cy, int *rx, int *ry, double sin_teta, double cos_teta); void cdRotatePointY(cdCanvas* canvas, int x, int y, int cx, int cy, int *ry, double sin_theta, double cos_theta); void cdTextTranslatePoint(cdCanvas* canvas, int x, int y, int w, int h, int baseline, int *rx, int *ry); @@ -303,6 +318,11 @@ int cdParseXWinFont(const char *nativefont, char *type_face, int *style, int *si int cdGetFontSizePixels(cdCanvas* canvas, int size); int cdGetFontSizePoints(cdCanvas* canvas, int size); +/* Replacements for Font using estimation */ +/* cdfontex.c */ +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); + /****************/ /* For Images */ /****************/ |