API Reference
OfficeTextPlacement
Shared text placement helpers for renderers that already translated document-specific alignment values.
Inheritance
- Object
- OfficeTextPlacement
Methods
public static Double ResolveAnchorX(Double left, Double availableWidth, OfficeTextAlignment alignment) #DoubleResolves the horizontal text anchor inside a left-based rectangle.
Parameters
- left System.Double
- Left edge of the available rectangle.
- availableWidth System.Double
- Available rectangle width.
- alignment OfficeIMO.Drawing.OfficeTextAlignment
- Horizontal text alignment.
Returns
The anchor X coordinate expected by anchored text drawing.
public static Double ResolveAnchorXFromCenter(Double centerX, Double availableWidth, OfficeTextAlignment alignment) #DoubleResolves the horizontal text anchor inside a center-based rectangle.
Parameters
- centerX System.Double
- Center X of the available rectangle.
- availableWidth System.Double
- Available rectangle width.
- alignment OfficeIMO.Drawing.OfficeTextAlignment
- Horizontal text alignment.
Returns
The anchor X coordinate expected by anchored text drawing.
public static Double ResolveLeftFromAnchor(Double anchorX, Double textWidth, OfficeTextAlignment alignment) #DoubleResolves the left coordinate of measured text from an anchor and alignment.
Parameters
- anchorX System.Double
- Text anchor X coordinate.
- textWidth System.Double
- Measured text width.
- alignment OfficeIMO.Drawing.OfficeTextAlignment
- Horizontal text alignment.
Returns
The left coordinate where measured text should begin.
public static Double ResolveLineLeft(Double left, Double availableWidth, Double textWidth, OfficeTextAlignment alignment) #DoubleResolves the left coordinate of measured text inside a left-based rectangle.
Parameters
- left System.Double
- Left edge of the available rectangle.
- availableWidth System.Double
- Available rectangle width.
- textWidth System.Double
- Measured text width.
- alignment OfficeIMO.Drawing.OfficeTextAlignment
- Horizontal text alignment.
Returns
The left coordinate where measured text should begin.
public static Double ResolveTop(Double top, Double availableHeight, Double textHeight, OfficeTextVerticalAlignment alignment) #DoubleResolves the top coordinate of measured text inside a top-based rectangle.
Parameters
- top System.Double
- Top edge of the available rectangle.
- availableHeight System.Double
- Available rectangle height.
- textHeight System.Double
- Measured text height.
- alignment OfficeIMO.Drawing.OfficeTextVerticalAlignment
- Vertical text alignment.
Returns
The top coordinate where measured text should begin.
public static Double ResolveTopFromCenter(Double centerY, Double availableHeight, Double textHeight, OfficeTextVerticalAlignment alignment) #DoubleResolves the top coordinate of measured text inside a center-based rectangle.
Parameters
- centerY System.Double
- Center Y of the available rectangle.
- availableHeight System.Double
- Available rectangle height.
- textHeight System.Double
- Measured text height.
- alignment OfficeIMO.Drawing.OfficeTextVerticalAlignment
- Vertical text alignment.
Returns
The top coordinate where measured text should begin.
public static OfficePoint RotatePoint(OfficePoint point, Double centerX, Double centerY, Double rotationDegrees) #OfficePointRotates a point around the supplied center using clockwise degrees.
Parameters
- point OfficeIMO.Drawing.OfficePoint
- Point to rotate.
- centerX System.Double
- Rotation center X coordinate.
- centerY System.Double
- Rotation center Y coordinate.
- rotationDegrees System.Double
- Clockwise rotation angle in degrees.
Returns
The rotated point.
Inherited Methods
public override Boolean Equals(Object obj) #BooleanParameters
- obj Object