diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2022-07-06 10:05:00 +0200 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2022-07-06 10:05:00 +0200 |
| commit | c6659c9a29ae4299736a5e4de627cc8e105bd40b (patch) | |
| tree | 8f7eb9963bc297de09251339cde68167074acff0 /src/drivers/Cairo/Fl_Cairo_Graphics_Driver.H | |
| parent | 3c6b34bb70726d437204d78e2cc7a29db3cb9ceb (diff) | |
Fl_Cairo_Graphics_Driver: fix issues in string width computations when scaling applies.
The implemented approach is to create and use the pango_layout_ object only relatively
to an unscaled cairo context. With this, the pixel width of a drawn string equals
the sum of the widths of its characters.
Diffstat (limited to 'src/drivers/Cairo/Fl_Cairo_Graphics_Driver.H')
| -rw-r--r-- | src/drivers/Cairo/Fl_Cairo_Graphics_Driver.H | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/drivers/Cairo/Fl_Cairo_Graphics_Driver.H b/src/drivers/Cairo/Fl_Cairo_Graphics_Driver.H index dfe67535e..255027e59 100644 --- a/src/drivers/Cairo/Fl_Cairo_Graphics_Driver.H +++ b/src/drivers/Cairo/Fl_Cairo_Graphics_Driver.H @@ -45,6 +45,7 @@ private: cairo_t *pango_layout_cairo_; PangoLayout *pango_layout_; int linestyle_; + int width_unscaled_(unsigned int c); protected: cairo_t *cairo_; public: |
