diff options
| author | Manolo Gouy <Manolo> | 2018-04-19 10:39:46 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2018-04-19 10:39:46 +0000 |
| commit | 54b697cd49d3946ecd1f264c0741f36568822819 (patch) | |
| tree | 399901a93956b7558be6d5e77ba62cb93ee7141d /src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx | |
| parent | d375918a5ea3210d0d148ec215f1494cbfbd927e (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.cxx')
| -rw-r--r-- | src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx b/src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx index a07e97313..20d129e75 100644 --- a/src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx +++ b/src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx @@ -109,7 +109,7 @@ void Fl_GDI_Graphics_Driver::copy_offscreen(int x, int y, int w, int h, Fl_Offsc HDC new_gc = CreateCompatibleDC(gc_); int save = SaveDC(new_gc); SelectObject(new_gc, bitmap); - BitBlt(gc_, x*scale_, y*scale_, w*scale_, h*scale_, new_gc, srcx*scale_, srcy*scale_, SRCCOPY); + BitBlt(gc_, x*scale(), y*scale(), w*scale(), h*scale(), new_gc, srcx*scale(), srcy*scale(), SRCCOPY); RestoreDC(new_gc, save); DeleteDC(new_gc); } @@ -147,7 +147,7 @@ void Fl_GDI_Graphics_Driver::translate_all(int x, int y) { depth = stack_height - 1; } GetWindowOrgEx((HDC)gc(), origins+depth); - SetWindowOrgEx((HDC)gc(), origins[depth].x - x*scale_, origins[depth].y - y*scale_, NULL); + SetWindowOrgEx((HDC)gc(), origins[depth].x - x*scale(), origins[depth].y - y*scale(), NULL); depth++; } @@ -230,9 +230,9 @@ void Fl_GDI_Graphics_Driver::set_spot(int font, int size, int X, int Y, int W, i void Fl_GDI_Graphics_Driver::scale(float f) { - if (f != scale_) { + if (f != scale()) { size_ = 0; - scale_ = f; + Fl_Graphics_Driver::scale(f); line_style(FL_SOLID); // scale also default line width } } |
