diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2021-02-26 18:00:07 +0100 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2021-05-31 08:28:06 +0200 |
| commit | b027d2ba57a8e0d6f0862e0a891ddd5dee4b02e2 (patch) | |
| tree | 3ed894bd9a891337804367a09de500ff060be640 /src/drivers/GDI/Fl_GDI_Copy_Surface_Driver.cxx | |
| parent | d95dd7acc4af3a4bd521d151ba3576b91d8ace53 (diff) | |
Windows platform: use GDI+ to antialias oblique lines and curves.
Diffstat (limited to 'src/drivers/GDI/Fl_GDI_Copy_Surface_Driver.cxx')
| -rw-r--r-- | src/drivers/GDI/Fl_GDI_Copy_Surface_Driver.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/drivers/GDI/Fl_GDI_Copy_Surface_Driver.cxx b/src/drivers/GDI/Fl_GDI_Copy_Surface_Driver.cxx index 9ba2db85f..c1d845e6a 100644 --- a/src/drivers/GDI/Fl_GDI_Copy_Surface_Driver.cxx +++ b/src/drivers/GDI/Fl_GDI_Copy_Surface_Driver.cxx @@ -42,7 +42,7 @@ Fl_Copy_Surface_Driver *Fl_Copy_Surface_Driver::newCopySurfaceDriver(int w, int Fl_GDI_Copy_Surface_Driver::Fl_GDI_Copy_Surface_Driver(int w, int h) : Fl_Copy_Surface_Driver(w, h) { - driver(new Fl_GDI_Graphics_Driver); + driver(Fl_Graphics_Driver::newMainGraphicsDriver()); oldgc = (HDC)Fl_Surface_Device::surface()->driver()->gc(); // exact computation of factor from screen units to EnhMetaFile units (0.01 mm) HDC hdc = GetDC(NULL); @@ -55,7 +55,7 @@ Fl_GDI_Copy_Surface_Driver::Fl_GDI_Copy_Surface_Driver(int w, int h) : Fl_Copy_S float factorh = (100.f * vmm) / vdots; // Global display scaling factor: 1, 1.25, 1.5, 1.75, etc... float scaling = Fl_Graphics_Driver::default_driver().scale(); - ((Fl_GDI_Graphics_Driver*)driver())->scale(scaling); + driver()->scale(scaling); RECT rect; rect.left = 0; rect.top = 0; rect.right = (LONG)((w*scaling) * factorw); rect.bottom = (LONG)((h*scaling) * factorh); gc = CreateEnhMetaFile (NULL, NULL, &rect, NULL); if (gc != NULL) { |
