Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/

API Reference

Class

OfficeTextPlacement

Namespace OfficeIMO.Drawing
Assembly OfficeIMO.Core
Modifiers static

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) #
Returns: Double

Resolves the horizontal text anchor inside a left-based rectangle.

Parameters

left System.Double requiredposition: 0
Left edge of the available rectangle.
availableWidth System.Double requiredposition: 1
Available rectangle width.
alignment OfficeIMO.Drawing.OfficeTextAlignment requiredposition: 2
Horizontal text alignment.

Returns

The anchor X coordinate expected by anchored text drawing.

public static Double ResolveAnchorXFromCenter(Double centerX, Double availableWidth, OfficeTextAlignment alignment) #
Returns: Double

Resolves the horizontal text anchor inside a center-based rectangle.

Parameters

centerX System.Double requiredposition: 0
Center X of the available rectangle.
availableWidth System.Double requiredposition: 1
Available rectangle width.
alignment OfficeIMO.Drawing.OfficeTextAlignment requiredposition: 2
Horizontal text alignment.

Returns

The anchor X coordinate expected by anchored text drawing.

public static Double ResolveLeftFromAnchor(Double anchorX, Double textWidth, OfficeTextAlignment alignment) #
Returns: Double

Resolves the left coordinate of measured text from an anchor and alignment.

Parameters

anchorX System.Double requiredposition: 0
Text anchor X coordinate.
textWidth System.Double requiredposition: 1
Measured text width.
alignment OfficeIMO.Drawing.OfficeTextAlignment requiredposition: 2
Horizontal text alignment.

Returns

The left coordinate where measured text should begin.

public static Double ResolveLineLeft(Double left, Double availableWidth, Double textWidth, OfficeTextAlignment alignment) #
Returns: Double

Resolves the left coordinate of measured text inside a left-based rectangle.

Parameters

left System.Double requiredposition: 0
Left edge of the available rectangle.
availableWidth System.Double requiredposition: 1
Available rectangle width.
textWidth System.Double requiredposition: 2
Measured text width.
alignment OfficeIMO.Drawing.OfficeTextAlignment requiredposition: 3
Horizontal text alignment.

Returns

The left coordinate where measured text should begin.

public static Double ResolveTop(Double top, Double availableHeight, Double textHeight, OfficeTextVerticalAlignment alignment) #
Returns: Double

Resolves the top coordinate of measured text inside a top-based rectangle.

Parameters

top System.Double requiredposition: 0
Top edge of the available rectangle.
availableHeight System.Double requiredposition: 1
Available rectangle height.
textHeight System.Double requiredposition: 2
Measured text height.
alignment OfficeIMO.Drawing.OfficeTextVerticalAlignment requiredposition: 3
Vertical text alignment.

Returns

The top coordinate where measured text should begin.

public static Double ResolveTopFromCenter(Double centerY, Double availableHeight, Double textHeight, OfficeTextVerticalAlignment alignment) #
Returns: Double

Resolves the top coordinate of measured text inside a center-based rectangle.

Parameters

centerY System.Double requiredposition: 0
Center Y of the available rectangle.
availableHeight System.Double requiredposition: 1
Available rectangle height.
textHeight System.Double requiredposition: 2
Measured text height.
alignment OfficeIMO.Drawing.OfficeTextVerticalAlignment requiredposition: 3
Vertical text alignment.

Returns

The top coordinate where measured text should begin.

public static OfficePoint RotatePoint(OfficePoint point, Double centerX, Double centerY, Double rotationDegrees) #
Returns: OfficePoint

Rotates a point around the supplied center using clockwise degrees.

Parameters

point OfficeIMO.Drawing.OfficePoint requiredposition: 0
Point to rotate.
centerX System.Double requiredposition: 1
Rotation center X coordinate.
centerY System.Double requiredposition: 2
Rotation center Y coordinate.
rotationDegrees System.Double requiredposition: 3
Clockwise rotation angle in degrees.

Returns

The rotated point.