Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

OfficeDrawingText

OfficeIMO.Drawing

Namespace
OfficeIMO.Drawing
Assembly
OfficeIMO.Core
Source revision
ba882f6b0d07 with working tree changes
Modifiers
sealed

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

Inheritance

Usage

Explore 1 API references to this type

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

Returned or exposed by 1

Constructors

OfficeDrawingText 3 overloads
public OfficeDrawingText(string text, double x, double y, double width, double height, OfficeFontInfo? font, OfficeColor? color, OfficeTextAlignment alignment, double? lineHeight) #

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

Parameters

text string required
x double required
y double required
width double required
height double required
font OfficeIMO.Drawing.OfficeFontInfo? required
color OfficeIMO.OfficeColor? required
alignment OfficeIMO.Drawing.OfficeTextAlignment required
lineHeight double? required
public OfficeDrawingText(string text, double x, double y, double width, double height, OfficeFontInfo? font = null, OfficeColor? color = null, OfficeTextAlignment alignment = Left, double? lineHeight = null, OfficeTextVerticalAlignment verticalAlignment = Top, double rotationDegrees = 0, double? rotationCenterX = null, double? rotationCenterY = null, bool wrapText = false, bool shrinkToFit = false, bool stackedText = false, bool flipHorizontal = false, bool flipVertical = false, OfficeTextPadding? padding = null, OfficeTextParagraphIndent? paragraphIndent = null) #

Creates a positioned drawing text box.

Parameters

text string required
x double required
y double required
width double required
height double required
font OfficeIMO.Drawing.OfficeFontInfo? = null optional
color OfficeIMO.OfficeColor? = null optional
alignment OfficeIMO.Drawing.OfficeTextAlignment = Left optional
lineHeight double? = null optional
verticalAlignment OfficeIMO.Drawing.OfficeTextVerticalAlignment = Top optional
rotationDegrees double = 0 optional
rotationCenterX double? = null optional
rotationCenterY double? = null optional
wrapText bool = false optional
shrinkToFit bool = false optional
stackedText bool = false optional
flipHorizontal bool = false optional
flipVertical bool = false optional
padding OfficeIMO.Drawing.OfficeTextPadding? = null optional
paragraphIndent OfficeIMO.Drawing.OfficeTextParagraphIndent? = null optional
public OfficeDrawingText(string text, double x, double y, double width, double height, OfficeFontInfo? font, OfficeColor? color, OfficeTextAlignment alignment, double? lineHeight, OfficeTextVerticalAlignment verticalAlignment, double rotationDegrees, double? rotationCenterX, double? rotationCenterY, bool wrapText, bool shrinkToFit, bool stackedText, bool flipHorizontal, bool flipVertical, OfficeTextPadding? padding, OfficeTextParagraphIndent? paragraphIndent, OfficeTextDecorationStyle underlineStyle, OfficeTextDecorationStyle strikethroughStyle, OfficeTextBaseline baseline) #

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

Parameters

text string required
x double required
y double required
width double required
height double required
font OfficeIMO.Drawing.OfficeFontInfo? required
color OfficeIMO.OfficeColor? required
alignment OfficeIMO.Drawing.OfficeTextAlignment required
lineHeight double? required
verticalAlignment OfficeIMO.Drawing.OfficeTextVerticalAlignment required
rotationDegrees double required
rotationCenterX double? required
rotationCenterY double? required
wrapText bool required
shrinkToFit bool required
stackedText bool required
flipHorizontal bool required
flipVertical bool required
padding OfficeIMO.Drawing.OfficeTextPadding? required
paragraphIndent OfficeIMO.Drawing.OfficeTextParagraphIndent? required
underlineStyle OfficeIMO.Drawing.OfficeTextDecorationStyle required
strikethroughStyle OfficeIMO.Drawing.OfficeTextDecorationStyle required
baseline OfficeIMO.Drawing.OfficeTextBaseline required

Methods

public OfficeDrawingText Clone() #

Creates a detached copy of this positioned text box.

public OfficeImageFrameTransform CreateFrameTransform() #

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

Properties

public string Text { get; private 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 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 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 bool WrapText { get; } #

Whether renderers should wrap text to the text box width.

public bool ShrinkToFit { get; } #

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

public bool 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 bool FlipHorizontal { get; } #

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

public bool 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 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 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 int BaselineLevel { get; } #

Resolved cumulative superscript or subscript nesting level.

public double BaselineScale { get; private set; } #

Resolved cumulative script font-size scale.

public double BaselineOffset { get; private set; } #

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

public bool HasPadding { get; } #

Whether the text frame has non-zero padding.

public bool HasParagraphIndent { get; } #

Whether the text frame has non-zero paragraph indentation.

public bool HasFrameTransform { get; } #

Whether the text frame applies rotation or mirroring.