summaryrefslogtreecommitdiff
path: root/src/drivers/GDI/Fl_GDI_Graphics_Driver_image.cxx
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2018-04-19 10:39:46 +0000
committerManolo Gouy <Manolo>2018-04-19 10:39:46 +0000
commit54b697cd49d3946ecd1f264c0741f36568822819 (patch)
tree399901a93956b7558be6d5e77ba62cb93ee7141d /src/drivers/GDI/Fl_GDI_Graphics_Driver_image.cxx
parentd375918a5ea3210d0d148ec215f1494cbfbd927e (diff)
Reorganise access to the value of the GUI scaling factor with public getter and protected, virtual setter member functions.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12858 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/drivers/GDI/Fl_GDI_Graphics_Driver_image.cxx')
-rw-r--r--src/drivers/GDI/Fl_GDI_Graphics_Driver_image.cxx28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/drivers/GDI/Fl_GDI_Graphics_Driver_image.cxx b/src/drivers/GDI/Fl_GDI_Graphics_Driver_image.cxx
index e67df4844..f66adba1e 100644
--- a/src/drivers/GDI/Fl_GDI_Graphics_Driver_image.cxx
+++ b/src/drivers/GDI/Fl_GDI_Graphics_Driver_image.cxx
@@ -403,10 +403,10 @@ void Fl_GDI_Graphics_Driver::delete_bitmask(Fl_Bitmask bm) {
}
void Fl_GDI_Graphics_Driver::draw_fixed(Fl_Bitmap *bm, int X, int Y, int W, int H, int cx, int cy) {
- X = X*scale_;
- Y = Y*scale_;
+ X = X*scale();
+ Y = Y*scale();
cache_size(bm, W, H);
- cx *= scale_; cy *= scale_;
+ cx *= scale(); cy *= scale();
HDC tempdc = CreateCompatibleDC(gc_);
int save = SaveDC(tempdc);
@@ -504,10 +504,10 @@ void Fl_GDI_Graphics_Driver::cache(Fl_RGB_Image *img)
void Fl_GDI_Graphics_Driver::draw_fixed(Fl_RGB_Image *img, int X, int Y, int W, int H, int cx, int cy) {
- X = X*scale_;
- Y = Y*scale_;
+ X = X*scale();
+ Y = Y*scale();
cache_size(img, W, H);
- cx *= scale_; cy *= scale_;
+ cx *= scale(); cy *= scale();
if (W + cx > img->data_w()) W = img->data_w() - cx;
if (H + cy > img->data_h()) H = img->data_h() - cy;
if (!*Fl_Graphics_Driver::id(img)) {
@@ -549,10 +549,10 @@ void Fl_GDI_Graphics_Driver::draw_rgb(Fl_RGB_Image *rgb, int XP, int YP, int WP,
int save = SaveDC(new_gc);
SelectObject(new_gc, (HBITMAP)*Fl_Graphics_Driver::id(rgb));
if ( (rgb->d() % 2) == 0 ) {
- alpha_blend_(XP*scale_, YP*scale_, W, H, new_gc, cx*scaleW, cy*scaleH, WP*scaleW, HP*scaleH);
+ alpha_blend_(XP*scale(), YP*scale(), W, H, new_gc, cx*scaleW, cy*scaleH, WP*scaleW, HP*scaleH);
} else {
SetStretchBltMode(gc_, HALFTONE);
- StretchBlt(gc_, XP*scale_, YP*scale_, W, H, new_gc, cx*scaleW, cy*scaleH, WP*scaleW, HP*scaleH, SRCCOPY);
+ StretchBlt(gc_, XP*scale(), YP*scale(), W, H, new_gc, cx*scaleW, cy*scaleH, WP*scaleW, HP*scaleH, SRCCOPY);
}
RestoreDC(new_gc, save);
DeleteDC(new_gc);
@@ -632,11 +632,11 @@ void Fl_GDI_Graphics_Driver::cache(Fl_Bitmap *bm) {
}
void Fl_GDI_Graphics_Driver::draw_fixed(Fl_Pixmap *pxm, int X, int Y, int W, int H, int cx, int cy) {
- X = X*scale_;
- Y = Y*scale_;
+ X = X*scale();
+ Y = Y*scale();
cache_size(pxm, W, H);
- cx *= scale_; cy *= scale_;
- Fl_Region r2 = scale_clip(scale_);
+ cx *= scale(); cy *= scale();
+ Fl_Region r2 = scale_clip(scale());
if (*Fl_Graphics_Driver::mask(pxm)) {
HDC new_gc = CreateCompatibleDC(gc_);
int save = SaveDC(new_gc);
@@ -647,9 +647,9 @@ void Fl_GDI_Graphics_Driver::draw_fixed(Fl_Pixmap *pxm, int X, int Y, int W, int
RestoreDC(new_gc,save);
DeleteDC(new_gc);
} else {
- float s = scale_; scale_ = 1;
+ float s = scale(); Fl_Graphics_Driver::scale(1);
copy_offscreen(X, Y, W, H, (Fl_Offscreen)*Fl_Graphics_Driver::id(pxm), cx, cy);
- scale_ = s;
+ Fl_Graphics_Driver::scale(s);
}
unscale_clip(r2);
}