⛏️ index : haiku.git

author Máximo Castañeda <antiswen@yahoo.es> 2025-03-17 13:33:42.0 +01:00:00
committer waddlesplash <waddlesplash@gmail.com> 2025-03-17 18:57:19.0 +00:00:00
commit
bbac6dc90468448fa73fef32b695a7f114fdac30 [patch]
tree
48f6b7f8cab28e5e611976fee3803f7535af883f
parent
396f9dc3e2a2d0366bddb397c7a2ac0a9e712059
download
bbac6dc90468448fa73fef32b695a7f114fdac30.tar.gz

app_server: transform text decoration lines

Apply the full affine transformation, not just a translation.

Change-Id: Ifbb4ce0e3be3b0746474fcefad2d00c08a2f3513
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9131
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>

Diff

 src/servers/app/drawing/Painter/AGGTextRenderer.cpp | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/src/servers/app/drawing/Painter/AGGTextRenderer.cpp b/src/servers/app/drawing/Painter/AGGTextRenderer.cpp
index c46d4fd..beaed38 100644
--- a/src/servers/app/drawing/Painter/AGGTextRenderer.cpp
+++ b/src/servers/app/drawing/Painter/AGGTextRenderer.cpp
@@ -329,11 +329,12 @@
	{
		agg::path_storage path;
		IntRect bounds = fBounds;
		bounds.bottom = (int)y;
		bounds.OffsetBy(fTransformOffset);
		path.move_to(bounds.left + 0.5, bounds.bottom + 0.5);
		path.line_to(bounds.right + 0.5, bounds.bottom + 0.5);
		path.close_polygon();
		BPoint left(bounds.left, y);
		BPoint right(bounds.right, y);
		fTransform.Transform(&left);
		fTransform.Transform(&right);
		path.move_to(left.x + 0.5, left.y + 0.5);
		path.line_to(right.x + 0.5, right.y + 0.5);
		agg::conv_stroke<agg::path_storage> pathStorage(path);
		pathStorage.width(fRenderer.fFont.Size() / 12.0f);
		if (fRenderer.fMaskedScanline != NULL) {