From 458d0636436b5f25e444dc285007dceac296c2ee Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Wed, 28 Mar 2018 13:00:12 +0000 Subject: 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 --- FL/Fl_Graphics_Driver.H | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'FL/Fl_Graphics_Driver.H') 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 */ -- cgit v1.2.3