diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2023-11-25 12:09:54 +0100 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2023-11-25 12:09:54 +0100 |
| commit | 4f894e4745280958e1e4a08f4e49bd94abb5ea36 (patch) | |
| tree | 601ccf06444641e8be938186a014c912e4dd6344 /src/drivers/Wayland/Fl_Wayland_Graphics_Driver.cxx | |
| parent | 0beab855a053275b41368d3f32cddd2d6389ca2c (diff) | |
Cairo graphics driver: Improve drawing of Fl_Pixmap and Fl_Bitmap
Previously, these objects were drawn slightly blurred on HighDPI.
This commit has them resized to the pixel size of the area where
they are being drawn and then drawn.
Diffstat (limited to 'src/drivers/Wayland/Fl_Wayland_Graphics_Driver.cxx')
| -rw-r--r-- | src/drivers/Wayland/Fl_Wayland_Graphics_Driver.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/drivers/Wayland/Fl_Wayland_Graphics_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Graphics_Driver.cxx index 34e4971da..b2def3703 100644 --- a/src/drivers/Wayland/Fl_Wayland_Graphics_Driver.cxx +++ b/src/drivers/Wayland/Fl_Wayland_Graphics_Driver.cxx @@ -287,3 +287,10 @@ Fl_Image_Surface *Fl_Wayland_Graphics_Driver::custom_offscreen(int w, int h, cairo_set_user_data(off->draw_buffer.cairo_, &key, &off->draw_buffer, NULL); return new Fl_Image_Surface(w, h, 0, (Fl_Offscreen)off->draw_buffer.cairo_); } + + +void Fl_Wayland_Graphics_Driver::cache_size(Fl_Image *img, int &width, int &height) { + Fl_Graphics_Driver::cache_size(img, width, height); + width *= wld_scale; + height *= wld_scale; +} |
