public RenderableText(IDrawableTextElement drawable, string text, Point pivotPosition, Point topLeft, Point offset) { Drawable = drawable; Text = text; Offset = offset; Origin = pivotPosition; TopLeft = topLeft; }
public TextOutputFragment(IDrawableTextElement drawable, int characterPosition) { CharacterPosition = characterPosition; Drawable = drawable; if (drawable.TokenText == "\n") { WillBeRendered = false; // It's important that Linebreak has an actual node as well as an instruction so we can maintain a 1:1 relationship between nodes and output fragments Nodes = new FlowLayout.LayoutNodeOrInstruction[] { FlowLayoutInstruction.Linebreak, LayoutNode.NamelessLeaf(LayoutSize.Pixels(Point.Zero)) }; } else { WillBeRendered = true; Nodes = new FlowLayout.LayoutNodeOrInstruction[] { LayoutNode.NamelessLeaf(LayoutSize.Pixels(drawable.Size)) }; } }
public FormattedTextToken(IDrawableTextElement drawable) { Drawable = drawable; }