diff options
| author | Manolo Gouy <Manolo> | 2011-02-18 13:39:48 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2011-02-18 13:39:48 +0000 |
| commit | 199b32d9213584e232aee11d2a4d16a26f1d508d (patch) | |
| tree | ff04fbca414c4ab7a497283f082bcf5f12b9a6de /FL/Fl_PostScript.H | |
| parent | 2c129b4833f45157fde8f90451240d4c00bbc96d (diff) | |
Added virtual width(), height(), descent() and text_extents() functions to the Fl_Graphics_Driver
class to prepare for the future definition of graphics drivers that fully deal with text measurement.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8442 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'FL/Fl_PostScript.H')
| -rw-r--r-- | FL/Fl_PostScript.H | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/FL/Fl_PostScript.H b/FL/Fl_PostScript.H index 56b05234e..b03b67c06 100644 --- a/FL/Fl_PostScript.H +++ b/FL/Fl_PostScript.H @@ -116,6 +116,9 @@ class Clip { /* int alpha_mask(const uchar * data, int w, int h, int D, int LD=0); */ void draw(const char* s, int n, int x, int y) {transformed_draw(s,n,x,y); }; +#ifdef __APPLE__ + void draw(const char* s, int n, float x, float y) {transformed_draw(s,n,x,y); }; +#endif void draw(int angle, const char *str, int n, int x, int y); void rtl_draw(const char* s, int n, int x, int y); void transformed_draw(const char* s, int n, double x, double y); //precise text placing @@ -180,6 +183,10 @@ class Clip { void transformed_vertex(double x, double y); void font(int face, int size); + double width(const char *, int); + void text_extents(const char *c, int n, int &dx, int &dy, int &w, int &h); + int height(); + int descent(); void draw_image(const uchar* d, int x,int y,int w,int h, int delta=3, int ldelta=0){draw_scaled_image(d,x,y,w,h,w,h,delta,ldelta);}; void draw_image_mono(const uchar* d, int x,int y,int w,int h, int delta=1, int ld=0){draw_scaled_image_mono(d,x,y,w,h,w,h,delta,ld);}; |
