summaryrefslogtreecommitdiff
path: root/FL/Fl_Device.H
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2015-03-10 21:06:22 +0000
committerManolo Gouy <Manolo>2015-03-10 21:06:22 +0000
commitdbde470f8d9803d6986ff57b7dfcb40d679508b7 (patch)
tree4d7fbeb02dcd207e96922506e6f0a71da796db45 /FL/Fl_Device.H
parentcc2436954d9c281b2a0589e5fc3fe89fa9d4aede (diff)
Added Fl_Shared_Image::scale(width, height) to support scaled image drawing (STR #3185).
Useful for printing, PostScript or PDF output, or retina displays. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10615 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'FL/Fl_Device.H')
-rw-r--r--FL/Fl_Device.H12
1 files changed, 12 insertions, 0 deletions
diff --git a/FL/Fl_Device.H b/FL/Fl_Device.H
index 7e8d7e5f0..3d86518f3 100644
--- a/FL/Fl_Device.H
+++ b/FL/Fl_Device.H
@@ -402,6 +402,14 @@ public:
inline Fl_Font_Descriptor *font_descriptor() { return font_descriptor_;}
/** Sets the current Fl_Font_Descriptor for the graphics driver */
inline void font_descriptor(Fl_Font_Descriptor *d) { font_descriptor_ = d;}
+#if FLTK_ABI_VERSION >= 10304 || defined(FL_DOXYGEN)
+ virtual
+#endif
+ int draw_scaled(Fl_RGB_Image *img, int X, int Y, int W, int H);
+#if FLTK_ABI_VERSION >= 10304 || defined(FL_DOXYGEN)
+ virtual
+#endif
+ int draw_scaled(Fl_Pixmap *img, int X, int Y, int W, int H);
/** \brief The destructor */
virtual ~Fl_Graphics_Driver() { if (p) free(p); }
};
@@ -428,6 +436,8 @@ public:
void draw(Fl_Pixmap *pxm, int XP, int YP, int WP, int HP, int cx, int cy);
void draw(Fl_Bitmap *pxm, int XP, int YP, int WP, int HP, int cx, int cy);
void draw(Fl_RGB_Image *img, int XP, int YP, int WP, int HP, int cx, int cy);
+ int draw_scaled(Fl_RGB_Image *img, int XP, int YP, int WP, int HP);
+ int draw_scaled(Fl_Pixmap *img, int XP, int YP, int WP, int HP);
void draw_image(const uchar* buf, int X,int Y,int W,int H, int D=3, int L=0);
void draw_image(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D=3);
void draw_image_mono(const uchar* buf, int X,int Y,int W,int H, int D=1, int L=0);
@@ -488,6 +498,8 @@ public:
const char *class_name() {return class_id;};
void draw(Fl_Pixmap *pxm, int XP, int YP, int WP, int HP, int cx, int cy);
void draw(Fl_Bitmap *bm, int XP, int YP, int WP, int HP, int cx, int cy);
+ int draw_scaled(Fl_RGB_Image *img, int X, int Y, int W, int H);
+ int draw_scaled(Fl_Pixmap *img, int X, int Y, int W, int H);
};
#endif
#if !(defined(__APPLE__) || defined(WIN32))