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_Bitmap.H | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'FL/Fl_Bitmap.H') diff --git a/FL/Fl_Bitmap.H b/FL/Fl_Bitmap.H index 03f1a62e8..79eba0a4b 100644 --- a/FL/Fl_Bitmap.H +++ b/FL/Fl_Bitmap.H @@ -44,15 +44,15 @@ private: int &X, int &Y, int &W, int &H); /** for internal use */ fl_uintptr_t id_; - float cache_scale_; // graphics scaling value when id_ was computed + int cache_w_, cache_h_; // size of bitmap when cached public: /** The constructors create a new bitmap from the specified bitmap data */ Fl_Bitmap(const uchar *bits, int W, int H) : - Fl_Image(W,H,0), array(bits), alloc_array(0), id_(0), cache_scale_(1) {data((const char **)&array, 1);} + Fl_Image(W,H,0), array(bits), alloc_array(0), id_(0), cache_w_(0),cache_h_(0) {data((const char **)&array, 1);} /** The constructors create a new bitmap from the specified bitmap data */ Fl_Bitmap(const char *bits, int W, int H) : - Fl_Image(W,H,0), array((const uchar *)bits), alloc_array(0), id_(0), cache_scale_(1) {data((const char **)&array, 1);} + Fl_Image(W,H,0), array((const uchar *)bits), alloc_array(0), id_(0), cache_w_(0),cache_h_(0) {data((const char **)&array, 1);} virtual ~Fl_Bitmap(); virtual Fl_Image *copy(int W, int H); Fl_Image *copy() { return Fl_Image::copy(); } -- cgit v1.2.3