summaryrefslogtreecommitdiff
path: root/FL/Fl_Graphics_Driver.H
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2018-03-28 13:00:12 +0000
committerManolo Gouy <Manolo>2018-03-28 13:00:12 +0000
commit458d0636436b5f25e444dc285007dceac296c2ee (patch)
tree88510e081d4f4199db92879b4a1960ea22204769 /FL/Fl_Graphics_Driver.H
parent29bda776bb78352b331771bd1169de31e4edc1be (diff)
Image classes: memorise the width and the height of the cached form of the image to support GUI scaling
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12811 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'FL/Fl_Graphics_Driver.H')
-rw-r--r--FL/Fl_Graphics_Driver.H21
1 files changed, 15 insertions, 6 deletions
diff --git a/FL/Fl_Graphics_Driver.H b/FL/Fl_Graphics_Driver.H
index c1588703b..fbd1b71ed 100644
--- a/FL/Fl_Graphics_Driver.H
+++ b/FL/Fl_Graphics_Driver.H
@@ -199,12 +199,21 @@ protected:
static fl_uintptr_t* mask(Fl_RGB_Image *rgb) {return &(rgb->mask_);}
/** Accessor to a private member variable of Fl_Pixmap */
static fl_uintptr_t* mask(Fl_Pixmap *pm) {return &(pm->mask_);}
- /** Accessor to a private member variable of Fl_Pixmap */
- static float* cache_scale(Fl_Pixmap *pm) {return &(pm->cache_scale_);}
- /** Accessor to a private member variable of Fl_Bitmap */
- static float* cache_scale(Fl_Bitmap *bm) {return &(bm->cache_scale_);}
- /** Accessor to a private member variable of Fl_RGB_Image */
- static float* cache_scale(Fl_RGB_Image *rgb) {return &(rgb->cache_scale_);}
+ /** Accessor to private member variables of Fl_Pixmap */
+ static void cache_w_h(Fl_Pixmap *pm, int*& pwidth, int*& pheight) {
+ pwidth = &(pm->cache_w_);
+ pheight = &(pm->cache_h_);
+ }
+ /** Accessor to private member variables of Fl_Bitmap */
+ static void cache_w_h(Fl_Bitmap *bm, int*& pwidth, int*& pheight) {
+ pwidth = &(bm->cache_w_);
+ pheight = &(bm->cache_h_);
+ }
+ /** Accessor to private member variables of Fl_RGB_Image */
+ static void cache_w_h(Fl_RGB_Image *rgb, int*& pwidth, int*& pheight) {
+ pwidth = &(rgb->cache_w_);
+ pheight = &(rgb->cache_h_);
+ }
/** Accessor to a private member variable of Fl_Pixmap */
static Fl_Color* pixmap_bg_color(Fl_Pixmap *pm) {return &(pm->pixmap_bg_color);}
/** For internal library use only */