diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2024-11-12 10:56:19 +0100 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2024-11-12 10:56:19 +0100 |
| commit | 2337214e4e734f7601799aa50b0020c3ff89aede (patch) | |
| tree | dc0f457ecb9badcf270b7d11d02bf1dad28363d2 /FL/Fl_Graphics_Driver.H | |
| parent | 0d4c8c8534e1e9ad24c29642f763b37e233112fa (diff) | |
Fix for Windows and X11: Rounding issues with Fl_RGB_Image::draw() (#1120)
Diffstat (limited to 'FL/Fl_Graphics_Driver.H')
| -rw-r--r-- | FL/Fl_Graphics_Driver.H | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/FL/Fl_Graphics_Driver.H b/FL/Fl_Graphics_Driver.H index 24246621c..2ac70ba03 100644 --- a/FL/Fl_Graphics_Driver.H +++ b/FL/Fl_Graphics_Driver.H @@ -413,10 +413,7 @@ class FL_EXPORT Fl_Scalable_Graphics_Driver : public Fl_Graphics_Driver { Fl_Fontsize fontsize_; // scale-independent font size value public: Fl_Scalable_Graphics_Driver(); - // This function aims to compute accurately int(x * s) in - // presence of rounding errors existing with floating point numbers - // and that sometimes differ between 32 and 64 bits. - static inline int floor(int x, float s) { return int(x * s + 0.001f); } + static int floor(int x, float s); inline int floor(int x) { return Fl_Scalable_Graphics_Driver::floor(x, scale()); } protected: int line_width_; |
