diff options
author | Neil <nyamatongwe@gmail.com> | 2021-03-26 16:36:29 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2021-03-26 16:36:29 +1100 |
commit | 7a3c73483c17da8f669fe3551ad274a02144486a (patch) | |
tree | 07402a7e1d2a83c0a1c44f843aba41615623c2c1 /src/Geometry.h | |
parent | f96ffc423d8af568c0f1dc066a4adbec54d49bdb (diff) | |
download | scintilla-mirror-7a3c73483c17da8f669fe3551ad274a02144486a.tar.gz |
Bug [#2224]. Switch XYPOSITION to double so it has more precision to fix
problems with very long documents.
Fixes uneven line heights on Cocoa after around 1.1 million lines.
Diffstat (limited to 'src/Geometry.h')
-rw-r--r-- | src/Geometry.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/Geometry.h b/src/Geometry.h index c3c539e6d..ed158c081 100644 --- a/src/Geometry.h +++ b/src/Geometry.h @@ -10,7 +10,7 @@ namespace Scintilla { -typedef float XYPOSITION; +typedef double XYPOSITION; typedef double XYACCUMULATOR; // Test if an enum class value has the bit flag(s) of test set. @@ -257,6 +257,9 @@ public: constexpr Stroke(ColourAlpha colour_, XYPOSITION width_=1.0f) noexcept : colour(colour_), width(width_) { } + constexpr float WidthF() { + return static_cast<float>(width); + } }; /** @@ -293,9 +296,9 @@ public: */ class ColourStop { public: - float position; + XYPOSITION position; ColourAlpha colour; - constexpr ColourStop(float position_, ColourAlpha colour_) noexcept : + constexpr ColourStop(XYPOSITION position_, ColourAlpha colour_) noexcept : position(position_), colour(colour_) { } }; |