From 523dcf5d30e85e745ad8e4e80298c7be4ed31309 Mon Sep 17 00:00:00 2001 From: Steven Kirk Date: Wed, 20 Mar 2019 16:57:06 +0100 Subject: [PATCH] Translate TextNode bounds by offset. The bounds of `TextNode` must include the offset passed to the constructor. --- src/Avalonia.Visuals/Rendering/SceneGraph/TextNode.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Avalonia.Visuals/Rendering/SceneGraph/TextNode.cs b/src/Avalonia.Visuals/Rendering/SceneGraph/TextNode.cs index dec5c382c9..ef392cd2af 100644 --- a/src/Avalonia.Visuals/Rendering/SceneGraph/TextNode.cs +++ b/src/Avalonia.Visuals/Rendering/SceneGraph/TextNode.cs @@ -27,7 +27,7 @@ namespace Avalonia.Rendering.SceneGraph Point origin, IFormattedTextImpl text, IDictionary childScenes = null) - : base(text.Bounds, transform, null) + : base(text.Bounds.Translate(origin), transform, null) { Transform = transform; Foreground = foreground?.ToImmutable();