API Reference
OfficeDrawingText
Positioned text box inside an OfficeDrawing canvas. Coordinates use the drawing's local top-left coordinate space.
Inheritance
- OfficeDrawingElement
- OfficeDrawingText
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
- Method OfficeDrawingText.Clone
Constructors
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
- x System.Double
- y System.Double
- width System.Double
- height System.Double
- font System.Nullable{OfficeIMO.Drawing.OfficeFontInfo}
- color System.Nullable{OfficeIMO.Drawing.OfficeColor}
- alignment OfficeIMO.Drawing.OfficeTextAlignment
- lineHeight System.Nullable{System.Double}
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
- x System.Double
- y System.Double
- width System.Double
- height System.Double
- font System.Nullable{OfficeIMO.Drawing.OfficeFontInfo} = null
- color System.Nullable{OfficeIMO.Drawing.OfficeColor} = null
- alignment OfficeIMO.Drawing.OfficeTextAlignment = Left
- lineHeight System.Nullable{System.Double} = null
- verticalAlignment OfficeIMO.Drawing.OfficeTextVerticalAlignment = Top
- rotationDegrees System.Double = 0
- rotationCenterX System.Nullable{System.Double} = null
- rotationCenterY System.Nullable{System.Double} = null
- wrapText System.Boolean = false
- shrinkToFit System.Boolean = false
- stackedText System.Boolean = false
- flipHorizontal System.Boolean = false
- flipVertical System.Boolean = false
- padding System.Nullable{OfficeIMO.Drawing.OfficeTextPadding} = null
- paragraphIndent System.Nullable{OfficeIMO.Drawing.OfficeTextParagraphIndent} = null
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
- x System.Double
- y System.Double
- width System.Double
- height System.Double
- font System.Nullable{OfficeIMO.Drawing.OfficeFontInfo}
- color System.Nullable{OfficeIMO.Drawing.OfficeColor}
- alignment OfficeIMO.Drawing.OfficeTextAlignment
- lineHeight System.Nullable{System.Double}
- verticalAlignment OfficeIMO.Drawing.OfficeTextVerticalAlignment
- rotationDegrees System.Double
- rotationCenterX System.Nullable{System.Double}
- rotationCenterY System.Nullable{System.Double}
- wrapText System.Boolean
- shrinkToFit System.Boolean
- stackedText System.Boolean
- flipHorizontal System.Boolean
- flipVertical System.Boolean
- padding System.Nullable{OfficeIMO.Drawing.OfficeTextPadding}
- paragraphIndent System.Nullable{OfficeIMO.Drawing.OfficeTextParagraphIndent}
- underlineStyle OfficeIMO.Drawing.OfficeTextDecorationStyle
- strikethroughStyle OfficeIMO.Drawing.OfficeTextDecorationStyle
- baseline OfficeIMO.Drawing.OfficeTextBaseline
Methods
Inherited Methods
public override Boolean Equals(Object obj) #BooleanParameters
- obj Object
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 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.