summaryrefslogtreecommitdiff
path: root/include/vcl
diff options
context:
space:
mode:
authorJonathan Clark <jonathan@libreoffice.org>2024-08-21 16:54:44 -0600
committerJonathan Clark <jonathan@libreoffice.org>2024-08-22 02:57:52 +0200
commit560e5406f3c6e8e6ed0f1c251b6910465266ed8d (patch)
tree19a10f69288ea67c05f7fb8dc7468231c8ba0c31 /include/vcl
parentb93c179b44e8b76e036e6fba560325c5cceb7103 (diff)
tdf#153966 vcl: Fix precision loss laying out right-aligned text
Previously, characters would appear to 'fidget' while typing right-aligned right-to-left text. This fix contains the following changes: - Removed a floating point truncate during right-align positioning. - Removed unnecessary repeated multiply-add from the main layout loop. Change-Id: I2f070efb6a1387db1595b41023bd0f076064afda Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172230 Tested-by: Jenkins Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
Diffstat (limited to 'include/vcl')
-rw-r--r--include/vcl/vcllayout.hxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/vcl/vcllayout.hxx b/include/vcl/vcllayout.hxx
index aa80e815a843..b36341ccc7a7 100644
--- a/include/vcl/vcllayout.hxx
+++ b/include/vcl/vcllayout.hxx
@@ -72,8 +72,8 @@ public:
// used by upper layers
basegfx::B2DPoint& DrawBase() { return maDrawBase; }
const basegfx::B2DPoint& DrawBase() const { return maDrawBase; }
- Point& DrawOffset() { return maDrawOffset; }
- const Point& DrawOffset() const { return maDrawOffset; }
+ basegfx::B2DPoint& DrawOffset() { return maDrawOffset; }
+ const basegfx::B2DPoint& DrawOffset() const { return maDrawOffset; }
basegfx::B2DPoint GetDrawPosition( const basegfx::B2DPoint& rRelative = basegfx::B2DPoint(0,0) ) const;
virtual bool LayoutText( vcl::text::ImplLayoutArgs&, const SalLayoutGlyphsImpl* ) = 0; // first step of layouting
@@ -136,7 +136,7 @@ protected:
Degree10 mnOrientation;
- mutable Point maDrawOffset;
+ basegfx::B2DPoint maDrawOffset;
basegfx::B2DPoint maDrawBase;
bool mbSubpixelPositioning;