Example #1
0
 public UText(String text, UHAlign halign, UVAlign valign, bool isWrapped, float width, float height)
 {
     this.text             = text;
     this.valign           = valign;
     this.halign           = halign;
     this.wrapped          = isWrapped;
     this.width            = width;
     this.height           = height;
     _styleRanges.changed += new VoidAction(_styleRanges_collectionChanged);
 }
Example #2
0
        float GetShift(float layoutHeight, float textHeight, UVAlign align)
        {
            switch (align)
            {
            default:
            case UVAlign.Top: return(0);

            case UVAlign.Middle: return((layoutHeight - textHeight) / 2f);

            case UVAlign.Bottom: return(layoutHeight - textHeight);
            }
        }
Example #3
0
        ParagraphAlignment Translate(UVAlign v)
        {
            switch (v)
            {
            case UVAlign.Top: return(ParagraphAlignment.Near);

            case UVAlign.Middle: return(ParagraphAlignment.Center);

            case UVAlign.Bottom: return(ParagraphAlignment.Far);

            default: return(ParagraphAlignment.Near);
            }
        }
Example #4
0
 void dtt(float x, float y, UHAlign h, UVAlign v, Color cl, IDraw rt)
 {
     tt.halign = h; tt.valign = v;
     //rt.uDraw.FillRectangle(new Rectangle(x, y, 100, 100), new USolidBrush() { color = cl });
     rt.uDraw.DrawText(tt, new Point(x, y), usb, UTextDrawOptions.None, false);
 }