Ejemplo n.º 1
0
 public RenderableText(IDrawableTextElement drawable, string text, Point pivotPosition, Point topLeft, Point offset)
 {
     Drawable = drawable;
     Text     = text;
     Offset   = offset;
     Origin   = pivotPosition;
     TopLeft  = topLeft;
 }
Ejemplo n.º 2
0
        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)) };
            }
        }
Ejemplo n.º 3
0
 public FormattedTextToken(IDrawableTextElement drawable)
 {
     Drawable = drawable;
 }