[]
        
(Showing Draft Content)

GrapeCity.Documents.Drawing.GcGraphics.MeasureRotatedText

MeasureRotatedText Method

MeasureRotatedText(TextLayout, int, bool, RectangleF, RotatedTextAlignment)

Calculates the bounds of rotated text inside an unrotated rectangle.

Note that the original textLayout will be changed by this method. If necessary, create a clone in advance.

Also note that the values of the following properties are ignored: MaxWidth, MaxHeight, FlowDirection, CanSkipFirstLineWithIndentation, ObjectRects, ParagraphAlignment, MarginLeft, MarginRight, MarginTop, MarginBottom, ColumnWidth, RowHeight.

Declaration
public RectangleF MeasureRotatedText(TextLayout textLayout, int angle, bool verticalStacking, RectangleF rect, RotatedTextAlignment alignment)
Public Function MeasureRotatedText(textLayout As TextLayout, angle As Integer, verticalStacking As Boolean, rect As RectangleF, alignment As RotatedTextAlignment) As RectangleF
Parameters
Type Name Description
TextLayout textLayout

The TextLayout to measure.

int angle

The text rotation angle, in degrees. The expected range is [-90, +90].

bool verticalStacking

If false, text lines are stacked horizontally along the top and bottom sides of rect. If true, the lines are stacked vertically along the left and right sides of the rectangle.

RectangleF rect

The target rectangle for the text.

RotatedTextAlignment alignment

Alignment of the text in the target rectangle.

Returns
Type Description
RectangleF

The rectangle occupied by the rotated text.