Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/

API Reference

Class

OfficeDrawingText

Namespace OfficeIMO.Drawing
Assembly OfficeIMO.Core
Modifiers sealed

Positioned text box inside an OfficeDrawing canvas. Coordinates use the drawing's local top-left coordinate space.

Inheritance

Usage

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Returned or exposed by

Constructors

OfficeDrawingText 3 overloads
public OfficeDrawingText(String text, Double x, Double y, Double width, Double height, Nullable<OfficeFontInfo> font, Nullable<OfficeColor> color, OfficeTextAlignment alignment, Nullable<Double> lineHeight) #

Creates an unrotated positioned drawing text box using the original public contract.

Parameters

text System.String requiredposition: 0
x System.Double requiredposition: 1
y System.Double requiredposition: 2
width System.Double requiredposition: 3
height System.Double requiredposition: 4
font System.Nullable{OfficeIMO.Drawing.OfficeFontInfo} requiredposition: 5
color System.Nullable{OfficeIMO.Drawing.OfficeColor} requiredposition: 6
alignment OfficeIMO.Drawing.OfficeTextAlignment requiredposition: 7
lineHeight System.Nullable{System.Double} requiredposition: 8
public OfficeDrawingText(String text, Double x, Double y, Double width, Double height, Nullable<OfficeFontInfo> font = null, Nullable<OfficeColor> color = null, OfficeTextAlignment alignment = Left, Nullable<Double> lineHeight = null, OfficeTextVerticalAlignment verticalAlignment = Top, Double rotationDegrees = 0, Nullable<Double> rotationCenterX = null, Nullable<Double> rotationCenterY = null, Boolean wrapText = false, Boolean shrinkToFit = false, Boolean stackedText = false, Boolean flipHorizontal = false, Boolean flipVertical = false, Nullable<OfficeTextPadding> padding = null, Nullable<OfficeTextParagraphIndent> paragraphIndent = null) #

Creates a positioned drawing text box.

Parameters

text System.String requiredposition: 0
x System.Double requiredposition: 1
y System.Double requiredposition: 2
width System.Double requiredposition: 3
height System.Double requiredposition: 4
font System.Nullable{OfficeIMO.Drawing.OfficeFontInfo} = null optionalposition: 5
color System.Nullable{OfficeIMO.Drawing.OfficeColor} = null optionalposition: 6
alignment OfficeIMO.Drawing.OfficeTextAlignment = Left optionalposition: 7
lineHeight System.Nullable{System.Double} = null optionalposition: 8
verticalAlignment OfficeIMO.Drawing.OfficeTextVerticalAlignment = Top optionalposition: 9
rotationDegrees System.Double = 0 optionalposition: 10
rotationCenterX System.Nullable{System.Double} = null optionalposition: 11
rotationCenterY System.Nullable{System.Double} = null optionalposition: 12
wrapText System.Boolean = false optionalposition: 13
shrinkToFit System.Boolean = false optionalposition: 14
stackedText System.Boolean = false optionalposition: 15
flipHorizontal System.Boolean = false optionalposition: 16
flipVertical System.Boolean = false optionalposition: 17
padding System.Nullable{OfficeIMO.Drawing.OfficeTextPadding} = null optionalposition: 18
paragraphIndent System.Nullable{OfficeIMO.Drawing.OfficeTextParagraphIndent} = null optionalposition: 19
public OfficeDrawingText(String text, Double x, Double y, Double width, Double height, Nullable<OfficeFontInfo> font, Nullable<OfficeColor> color, OfficeTextAlignment alignment, Nullable<Double> lineHeight, OfficeTextVerticalAlignment verticalAlignment, Double rotationDegrees, Nullable<Double> rotationCenterX, Nullable<Double> rotationCenterY, Boolean wrapText, Boolean shrinkToFit, Boolean stackedText, Boolean flipHorizontal, Boolean flipVertical, Nullable<OfficeTextPadding> padding, Nullable<OfficeTextParagraphIndent> paragraphIndent, OfficeTextDecorationStyle underlineStyle, OfficeTextDecorationStyle strikethroughStyle, OfficeTextBaseline baseline) #

Creates a positioned drawing text box with typed decoration and baseline styling.

Parameters

text System.String requiredposition: 0
x System.Double requiredposition: 1
y System.Double requiredposition: 2
width System.Double requiredposition: 3
height System.Double requiredposition: 4
font System.Nullable{OfficeIMO.Drawing.OfficeFontInfo} requiredposition: 5
color System.Nullable{OfficeIMO.Drawing.OfficeColor} requiredposition: 6
alignment OfficeIMO.Drawing.OfficeTextAlignment requiredposition: 7
lineHeight System.Nullable{System.Double} requiredposition: 8
verticalAlignment OfficeIMO.Drawing.OfficeTextVerticalAlignment requiredposition: 9
rotationDegrees System.Double requiredposition: 10
rotationCenterX System.Nullable{System.Double} requiredposition: 11
rotationCenterY System.Nullable{System.Double} requiredposition: 12
wrapText System.Boolean requiredposition: 13
shrinkToFit System.Boolean requiredposition: 14
stackedText System.Boolean requiredposition: 15
flipHorizontal System.Boolean requiredposition: 16
flipVertical System.Boolean requiredposition: 17
padding System.Nullable{OfficeIMO.Drawing.OfficeTextPadding} requiredposition: 18
paragraphIndent System.Nullable{OfficeIMO.Drawing.OfficeTextParagraphIndent} requiredposition: 19
underlineStyle OfficeIMO.Drawing.OfficeTextDecorationStyle requiredposition: 20
strikethroughStyle OfficeIMO.Drawing.OfficeTextDecorationStyle requiredposition: 21
baseline OfficeIMO.Drawing.OfficeTextBaseline requiredposition: 22

Methods

public OfficeDrawingText Clone() #
Returns: OfficeDrawingText

Creates a detached copy of this positioned text box.

public OfficeImageFrameTransform CreateFrameTransform() #
Returns: OfficeImageFrameTransform

Creates the reusable destination-space frame transform for this text box.

Properties

public String Text { get; set; } #

Editable logical text content. PDF glyph aliases used for rendering stay internal.

public Double X { get; } #

Text box horizontal position inside the drawing.

public Double Y { get; } #

Text box vertical position inside the drawing.

public Double Width { get; } #

Text box width.

public Double Height { get; } #

Text box height.

public OfficeFontInfo Font { get; } #

Font descriptor for the text.

public Nullable<OfficeColor> Color { get; } #

Optional text color. Null lets renderers choose their default text color.

public OfficeTextAlignment Alignment { get; } #

Horizontal text alignment inside the text box.

public Nullable<Double> LineHeight { get; } #

Optional line height in drawing units. Null lets renderers use their default line height.

public OfficeTextVerticalAlignment VerticalAlignment { get; } #

Vertical placement of text inside the drawing text box.

public Double RotationDegrees { get; } #

Clockwise text rotation in degrees.

public Double RotationCenterX { get; } #

X coordinate of the text rotation center in the drawing's local coordinate space.

public Double RotationCenterY { get; } #

Y coordinate of the text rotation center in the drawing's local coordinate space.

public Boolean WrapText { get; } #

Whether renderers should wrap text to the text box width.

public Boolean ShrinkToFit { get; } #

Whether renderers should reduce font size when text overflows the text box.

public Boolean StackedText { get; } #

Whether renderers should lay text out as upright stacked characters.

public OfficeTextDirection TextDirection { get; } #

Explicit text-flow direction, including top-to-bottom shaped text.

public Boolean FlipHorizontal { get; } #

Whether renderers should mirror the text frame horizontally around the rotation center.

public Boolean FlipVertical { get; } #

Whether renderers should mirror the text frame vertically around the rotation center.

public OfficeTextPadding Padding { get; } #

Insets applied inside the text frame before text layout.

public OfficeTextParagraphIndent ParagraphIndent { get; } #

First-line and continuation-line offsets applied inside the text frame.

public OfficeTextOverflowBehavior OverflowBehavior { get; } #

Controls whether overflowing text is shortened or retained for caller-owned clipping.

public Nullable<Double> TextAdvanceWidth { get; } #

Optional resolved horizontal text advance retained by layout-aware producers. SVG and raster exporters use it to keep adjacent positioned runs aligned across font engines.

public OfficeTextDecorationStyle UnderlineStyle { get; } #

Resolved underline pattern.

public OfficeTextDecorationStyle StrikethroughStyle { get; } #

Resolved strikethrough pattern.

public Nullable<OfficeColor> DecorationColor { get; } #

Optional underline and strikethrough color. Null uses the text color.

public OfficeTextBaseline Baseline { get; } #

Resolved text baseline placement.

public OfficeTextFeatureSettings FeatureSettings { get; } #

OpenType feature selections used by text shaping.

public String FontPalette { get; } #

Resolved color-font palette selection.

public Int32 BaselineLevel { get; } #

Resolved cumulative superscript or subscript nesting level.

public Double BaselineScale { get; set; } #

Resolved cumulative script font-size scale.

public Double BaselineOffset { get; set; } #

Resolved cumulative top-down baseline displacement; negative values raise text.

public Boolean HasPadding { get; } #

Whether the text frame has non-zero padding.

public Boolean HasParagraphIndent { get; } #

Whether the text frame has non-zero paragraph indentation.

public Boolean HasFrameTransform { get; } #

Whether the text frame applies rotation or mirroring.