diff options
| author | Manolo Gouy <Manolo> | 2018-03-19 17:43:18 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2018-03-19 17:43:18 +0000 |
| commit | 916b44e361f275555c5f22b9d91c973ccc089037 (patch) | |
| tree | a36b734804a82d3e5d4bd900bc9031b8fe60d35a /src/drivers/GDI/Fl_GDI_Graphics_Driver.H | |
| parent | c4f7c09b7bacbfe19d1dcea5a28eeb30b1136a95 (diff) | |
New member function Fl_Image::scale(int width, int height) to set the FLTK size of an image.
Each image has now two sizes implemented as follows:
- the pixel size is stored in private members pixel_w_ and pixel_h_
with public accessors pixel_w() and pixel_h()
- the FLTK size is stored in private members w_ and h_ and read by w() and h()
- when the image is constructed, the two sizes have the same value
- the protected w(int) and h(int) member functions set both FLTK and pixel sizes.
- the public scale(int, int) member function is essentially nothing but
set the FLTK size and don't change the pixel size.
- when the image is drawn, its FLTK size determines how big it is drawn, its pixel
size determines how much data are available to draw it.
FLTK 1.3.4 with FL_ABI_VERSION=10304 contained an equivalent member function
but only for the Fl_Shared_Image class.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12776 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/drivers/GDI/Fl_GDI_Graphics_Driver.H')
| -rw-r--r-- | src/drivers/GDI/Fl_GDI_Graphics_Driver.H | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/drivers/GDI/Fl_GDI_Graphics_Driver.H b/src/drivers/GDI/Fl_GDI_Graphics_Driver.H index 5bfd9b515..f6554a076 100644 --- a/src/drivers/GDI/Fl_GDI_Graphics_Driver.H +++ b/src/drivers/GDI/Fl_GDI_Graphics_Driver.H @@ -72,9 +72,9 @@ public: virtual void draw_image_unscaled(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D=3); virtual void draw_image_mono_unscaled(const uchar* buf, int X,int Y,int W,int H, int D=1, int L=0); virtual void draw_image_mono_unscaled(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D=1); - fl_uintptr_t cache(Fl_Pixmap *img, int w, int h, const char *const*array); + fl_uintptr_t cache(Fl_Pixmap *img); virtual void uncache_pixmap(fl_uintptr_t p); - fl_uintptr_t cache(Fl_Bitmap *img, int w, int h, const uchar *array); + fl_uintptr_t cache(Fl_Bitmap *img); void uncache(Fl_RGB_Image *img, fl_uintptr_t &id_, fl_uintptr_t &mask_); virtual double width_unscaled(const char *str, int n); virtual double width_unscaled(unsigned int c); |
