[]
Defines the rectangle for a text fragment in TextLayout.
public class TextRect
Initializes a new instance of the TextRect class with the specified coordinates, size, and flags.
public TextRect(int codePointIndex, int codePointCount, float x, float y, float width, float height, bool rightToLeft, bool vertical, bool sideways, bool rotateSidewaysCounterclockwise)
codePointIndex intIndex of the first code point in the text fragment.
codePointCount intThe number of code points in the text fragment.
x floatThe X coordinate of the rectangle.
y floatThe Y coordinate of the rectangle.
width floatThe width of the rectangle.
height floatThe height of the rectangle.
rightToLeft boolIndicates if the text fragment should appear from right to left.
vertical boolIndicates if the text fragment should appear upright with vertical reading direction.
sideways boolIndicates if the text fragment should appear rotated 90 or -90 degrees.
rotateSidewaysCounterclockwise boolIndicates if sideways should be rotated counterclockwise.
Gets the y-coordinate of the bottom edge of this TextRect, in graphic units.
public float Bottom { get; }
Gets the number of text fragment's code points.
public int CodePointCount { get; }
Gets the index of the text fragment's first code point.
public int CodePointIndex { get; }
Gets the height of this TextRect, in graphic units.
public float Height { get; }
Gets the x-coordinate of the left edge of this TextRect, in graphic units.
public float Left { get; }
Gets the x-coordinate of the right edge of this TextRect, in graphic units.
public float Right { get; }
Indicates if the text fragment should appear from right to left.
public bool RightToLeft { get; }
Indicates if sideways should be rotated counterclockwise.
public bool RotateSidewaysCounterclockwise { get; }
Indicates if the text fragment should appear rotated 90 or -90 degrees.
public bool Sideways { get; }
Gets the y-coordinate of the top edge of this TextRect, in graphic units.
public float Top { get; }
Indicates if the text fragment should appear upright with vertical reading direction.
public bool Vertical { get; }
Gets the width of this TextRect, in graphic units.
public float Width { get; }
Gets the x-coordinate of the left edge of this TextRect, in graphic units.
public float X { get; }
Gets the y-coordinate of the top edge of this TextRect, in graphic units.
public float Y { get; }
Converts an TextRect to System.Drawing.RectangleF.
public RectangleF ToRectangleF()
Performs an explicit conversion from TextRect to System.Drawing.RectangleF.
public static explicit operator RectangleF(TextRect rect)
rect TextRect