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(-)
@@ -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) {