Browse Source

Translate TextNode bounds by offset.

The bounds of `TextNode` must include the offset passed to the constructor.
pull/2382/head
Steven Kirk 8 years ago
parent
commit
523dcf5d30
  1. 2
      src/Avalonia.Visuals/Rendering/SceneGraph/TextNode.cs

2
src/Avalonia.Visuals/Rendering/SceneGraph/TextNode.cs

@ -27,7 +27,7 @@ namespace Avalonia.Rendering.SceneGraph
Point origin,
IFormattedTextImpl text,
IDictionary<IVisual, Scene> childScenes = null)
: base(text.Bounds, transform, null)
: base(text.Bounds.Translate(origin), transform, null)
{
Transform = transform;
Foreground = foreground?.ToImmutable();

Loading…
Cancel
Save