diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2020-11-12 07:46:00 +0100 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2020-11-12 07:46:12 +0100 |
| commit | 231159e16c7bd8438f3e567507f5ad394d00c760 (patch) | |
| tree | 7f66a27cc68c3daa5274fa0c53803bf77e07199d /FL/Fl_SVG_Image.H | |
| parent | df9749e6a8a72da60d80d9f519377f3c12a9409e (diff) | |
Fix for issue #155 - continued
The issue lies in details how floating point scaled coordinates are converted
to integer values and its impact on the drawing of large SVG images.
This commit fixes the X11 platform.
The macOS platform is immune because drawing uses floating point
coordinates.
The Windows platform still needs fixing.
Diffstat (limited to 'FL/Fl_SVG_Image.H')
| -rw-r--r-- | FL/Fl_SVG_Image.H | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/FL/Fl_SVG_Image.H b/FL/Fl_SVG_Image.H index 9a2504c02..7ced23cc0 100644 --- a/FL/Fl_SVG_Image.H +++ b/FL/Fl_SVG_Image.H @@ -133,6 +133,7 @@ struct NSVGimage; */ class FL_EXPORT Fl_SVG_Image : public Fl_RGB_Image { + friend class Fl_Graphics_Driver; private: typedef struct { NSVGimage* svg_image; @@ -146,6 +147,7 @@ private: float average_weight_; float svg_scaling_(int W, int H); void rasterize_(int W, int H); + void cache_size(int &width, int &height); void init_(const char *filename, const char *filedata, Fl_SVG_Image *copy_source); Fl_SVG_Image(Fl_SVG_Image *source); public: |
