diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Geometry.h | 9 | ||||
-rw-r--r-- | src/LineMarker.cxx | 2 | ||||
-rw-r--r-- | src/Platform.h | 4 |
3 files changed, 9 insertions, 6 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_) { } }; diff --git a/src/LineMarker.cxx b/src/LineMarker.cxx index 13d8b05ae..5acfb7cb3 100644 --- a/src/LineMarker.cxx +++ b/src/LineMarker.cxx @@ -147,7 +147,7 @@ void DrawTail(Surface *surface, XYPOSITION leftLine, XYPOSITION rightTail, XYPOS void LineMarker::DrawFoldingMark(Surface *surface, const PRectangle &rcWhole, FoldPart part) const { // Assume: edges of rcWhole are integers. // Code can only really handle integer strokeWidth. - constexpr float strokeWidth = 1.0f; + constexpr XYPOSITION strokeWidth = 1.0f; ColourDesired colourHead = back; ColourDesired colourBody = back; diff --git a/src/Platform.h b/src/Platform.h index 8898e66f9..98e6440aa 100644 --- a/src/Platform.h +++ b/src/Platform.h @@ -96,7 +96,7 @@ constexpr const char *localeNameDefault = "en-us"; struct FontParameters { const char *faceName; - float size; + XYPOSITION size; int weight; bool italic; int extraFontFlag; @@ -106,7 +106,7 @@ struct FontParameters { constexpr FontParameters( const char *faceName_, - float size_=10, + XYPOSITION size_=10, int weight_=400, bool italic_=false, int extraFontFlag_=0, |