OfficeDrawing
OfficeIMO.Drawing
Dependency-free vector drawing canvas shared by OfficeIMO document packages. Coordinates are expressed in the caller's layout unit and use a local top-left origin.
Inheritance
- object
- OfficeDrawing
Usage
Explore 58 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 38
- Method OfficeChartDrawingRenderer.Render
- Property OfficeChartRenderingResult.Drawing
- Method OfficeConicGradient.CreateDrawing
- Method OfficeDrawing.AddActualTextDrawing
- Method OfficeDrawing.AddBorderBox
- Method OfficeDrawing.AddClippedDrawing
- Method OfficeDrawing.AddClippedImage
- Method OfficeDrawing.AddClippedImageWithInterpolation
- Method OfficeDrawing.AddClippedPositionedText
- Method OfficeDrawing.AddClippedText
- Method OfficeDrawing.AddDrawing
- Method OfficeDrawing.AddEffectDrawing
- Method OfficeDrawing.AddFont
- Method OfficeDrawing.AddImage
- Method OfficeDrawing.AddImageBehindContent
- Method OfficeDrawing.AddImagePattern
- Method OfficeDrawing.AddImageWithInterpolation
- Method OfficeDrawing.AddLink
- Method OfficeDrawing.AddPositionedText
- Method OfficeDrawing.AddRichText
- Method OfficeDrawing.AddRichTextBehindContent
- Method OfficeDrawing.AddRichTextParagraphs
- Method OfficeDrawing.AddShape
- Method OfficeDrawing.AddShapeBehindContent
- Method OfficeDrawing.AddStyledText
- Method OfficeDrawing.AddText
- Method OfficeDrawing.AddTextBehindContent
- Method OfficeDrawing.AddTilingPattern
- Method OfficeDrawing.AddVerticalText
- Method OfficeDrawing.Clone
- Property OfficeDrawingEffectGroup.Drawing
- Property OfficeDrawingGroup.Drawing
- Property OfficeDrawingSoftMask.Drawing
- Property OfficeDrawingTilingPattern.Tile
- Method OfficeInkRenderer.Render
- Method OfficeMathRenderer.Render
- Method OfficeSvgForeignObjectRenderer.EndInvoke
- Method OfficeSvgForeignObjectRenderer.Invoke
Accepted by parameters 20
- Constructor OfficeChartRenderingResult.OfficeChartRenderingResult
- Method OfficeDrawing.AddActualTextDrawing
- Method OfficeDrawing.AddClippedDrawing
- Method OfficeDrawing.AddDrawing
- Method OfficeDrawing.AddEffectDrawing
- Method OfficeDrawing.AddTilingPattern
- Constructor OfficeDrawingEffectGroup.OfficeDrawingEffectGroup
- Constructor OfficeDrawingGroup.OfficeDrawingGroup
- Method OfficeDrawingPortableExporter.TryExportJson
- Method OfficeDrawingQualityAnalyzer.Analyze
- Method OfficeDrawingRasterRenderer.Render
- Method OfficeDrawingRasterRenderer.ToPng
- Constructor OfficeDrawingSoftMask.OfficeDrawingSoftMask
- Method OfficeDrawingSoftMask.CreateWithLuminosityStandard
- Method OfficeDrawingSvgExporter.ToSvg
- Method OfficeDrawingSvgExporter.ToSvgBytes
- Constructor OfficeDrawingTilingPattern.OfficeDrawingTilingPattern
- Method OfficeInkRenderer.AddToDrawing
- Method OfficeMathRenderer.AddToDrawing
- Method OfficeSvgDrawingReader.TryRead
Constructors
public OfficeDrawing(double width, double height) #Creates a drawing canvas.
Parameters
- width double
- height double
Methods
public OfficeDrawing AddActualTextDrawing(string actualText, OfficeDrawing drawing, double actualTextAnchorX, double actualTextAnchorY) #Adds vector paint that represents one logical text string. The paint remains native while PDF and SVG exporters can expose the string once for extraction and accessibility.
Parameters
- actualText string
- drawing OfficeIMO.Drawing.OfficeDrawing
- actualTextAnchorX double
- actualTextAnchorY double
Returns
OfficeDrawingpublic OfficeDrawing AddBorderBox(double x, double y, double width, double height, OfficeColor? fillColor, OfficeBorderBox borders, OfficeTransform? transform = null) #Adds a filled rectangle and independent edge borders in paint order.
Parameters
- x double
- y double
- width double
- height double
- fillColor OfficeIMO.OfficeColor?
- borders OfficeIMO.Drawing.OfficeBorderBox
- transform OfficeIMO.Drawing.OfficeTransform? = null
Returns
OfficeDrawingpublic OfficeDrawing AddClippedDrawing(OfficeDrawing drawing, double x, double y, OfficeClipPath clipPath) #Adds another drawing as a clipped nested group at a local destination offset.
Parameters
- drawing OfficeIMO.Drawing.OfficeDrawing
- x double
- y double
- clipPath OfficeIMO.Drawing.OfficeClipPath
Returns
OfficeDrawingpublic OfficeDrawing AddClippedDrawing(OfficeDrawing drawing, double x, double y, OfficeClipPath clipPath, OfficeImageFrameTransform frameTransform) #Adds another drawing as a clipped nested group at a local destination offset with a shared frame transform.
Parameters
- drawing OfficeIMO.Drawing.OfficeDrawing
- x double
- y double
- clipPath OfficeIMO.Drawing.OfficeClipPath
- frameTransform OfficeIMO.Drawing.OfficeImageFrameTransform
Returns
OfficeDrawingpublic OfficeDrawing AddClippedDrawing(OfficeDrawing drawing, double x, double y, OfficeClipPath clipPath, double contentOffsetX, double contentOffsetY) #Adds another drawing as a clipped group with an independent content offset.
Parameters
- drawing OfficeIMO.Drawing.OfficeDrawing
- x double
- y double
- clipPath OfficeIMO.Drawing.OfficeClipPath
- contentOffsetX double
- contentOffsetY double
Returns
OfficeDrawingpublic OfficeDrawing AddClippedDrawing(OfficeDrawing drawing, double x, double y, OfficeClipPath clipPath, double contentOffsetX, double contentOffsetY, OfficeImageFrameTransform frameTransform) #Adds another drawing as a clipped group with independent content offset and frame transform.
Parameters
- drawing OfficeIMO.Drawing.OfficeDrawing
- x double
- y double
- clipPath OfficeIMO.Drawing.OfficeClipPath
- contentOffsetX double
- contentOffsetY double
- frameTransform OfficeIMO.Drawing.OfficeImageFrameTransform
Returns
OfficeDrawingpublic OfficeDrawing AddClippedImage(byte[] bytes, string? contentType, OfficeImageProjection projection, double clipX, double clipY, OfficeClipPath clipPath, string? alternativeText = null, double opacity = 1) #Adds an image clipped by a drawing-local clipping path.
Parameters
- bytes byte[]
- contentType string?
- projection OfficeIMO.Drawing.OfficeImageProjection
- clipX double
- clipY double
- clipPath OfficeIMO.Drawing.OfficeClipPath
- alternativeText string? = null
- opacity double = 1
Returns
OfficeDrawingpublic OfficeDrawing AddClippedImageWithInterpolation(byte[] bytes, string? contentType, OfficeImageProjection projection, bool interpolate, double clipX, double clipY, OfficeClipPath clipPath, string? alternativeText = null, double opacity = 1) #Adds an image with explicit scaling interpolation behavior, clipped by a drawing-local path.
Parameters
- bytes byte[]
- contentType string?
- projection OfficeIMO.Drawing.OfficeImageProjection
- interpolate bool
- clipX double
- clipY double
- clipPath OfficeIMO.Drawing.OfficeClipPath
- alternativeText string? = null
- opacity double = 1
Returns
OfficeDrawingpublic OfficeDrawing AddClippedPositionedText(string text, double x, double y, double width, double height, double clipX, double clipY, OfficeClipPath clipPath, OfficeFontInfo? font = null, OfficeColor? color = null, OfficeTextAlignment alignment = Left, double? lineHeight = null, double? textAdvanceWidth = null) #Adds an already-positioned single text run clipped by a drawing-local clipping path. The clipping frame is independent from the resolved glyph advance retained for rendering.
Parameters
- text string
- Text content to draw.
- x double
- Horizontal frame position in drawing units.
- y double
- Vertical frame position in drawing units.
- width double
- Text frame width in drawing units.
- height double
- Text frame height in drawing units.
- clipX double
- Horizontal clip position in drawing units.
- clipY double
- Vertical clip position in drawing units.
- clipPath OfficeIMO.Drawing.OfficeClipPath
- Clip path relative to clipX and clipY.
- font OfficeIMO.Drawing.OfficeFontInfo? = null
- Optional font descriptor.
- color OfficeIMO.OfficeColor? = null
- Optional text color.
- alignment OfficeIMO.Drawing.OfficeTextAlignment = Left
- Horizontal alignment inside the frame.
- lineHeight double? = null
- Optional resolved line height.
- textAdvanceWidth double? = null
- Resolved horizontal glyph advance, or null to use width.
public OfficeDrawing AddClippedPositionedText(string text, double x, double y, double width, double height, double clipX, double clipY, OfficeClipPath clipPath, OfficeImageFrameTransform frameTransform, OfficeFontInfo? font = null, OfficeColor? color = null, OfficeTextAlignment alignment = Left, double? lineHeight = null, double? textAdvanceWidth = null) #Adds a transformed source text run inside a drawing-local clip path, retaining the resolved glyph advance and complete source text.
Parameters
- text string
- x double
- y double
- width double
- height double
- clipX double
- clipY double
- clipPath OfficeIMO.Drawing.OfficeClipPath
- frameTransform OfficeIMO.Drawing.OfficeImageFrameTransform
- font OfficeIMO.Drawing.OfficeFontInfo? = null
- color OfficeIMO.OfficeColor? = null
- alignment OfficeIMO.Drawing.OfficeTextAlignment = Left
- lineHeight double? = null
- textAdvanceWidth double? = null
Returns
OfficeDrawingpublic OfficeDrawing AddClippedText(string text, double x, double y, double width, double height, double clipX, double clipY, OfficeClipPath clipPath, 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) #Adds text clipped by a drawing-local clipping path.
Parameters
- text string
- x double
- y double
- width double
- height double
- clipX double
- clipY double
- clipPath OfficeIMO.Drawing.OfficeClipPath
- font OfficeIMO.Drawing.OfficeFontInfo? = null
- color OfficeIMO.OfficeColor? = null
- alignment OfficeIMO.Drawing.OfficeTextAlignment = Left
- lineHeight double? = null
- verticalAlignment OfficeIMO.Drawing.OfficeTextVerticalAlignment = Top
- rotationDegrees double = 0
- rotationCenterX double? = null
- rotationCenterY double? = null
- wrapText bool = false
- shrinkToFit bool = false
- stackedText bool = false
- flipHorizontal bool = false
- flipVertical bool = false
- padding OfficeIMO.Drawing.OfficeTextPadding? = null
- paragraphIndent OfficeIMO.Drawing.OfficeTextParagraphIndent? = null
Returns
OfficeDrawingpublic OfficeDrawing AddDrawing(OfficeDrawing drawing, double x, double y) #Adds all elements from another drawing at a local destination offset and returns this drawing.
Parameters
- drawing OfficeIMO.Drawing.OfficeDrawing
- x double
- y double
Returns
OfficeDrawingpublic OfficeDrawing AddDrawing(OfficeDrawing drawing, double x, double y, OfficeImageFrameTransform frameTransform) #Adds all elements from another drawing at a local destination offset with a shared frame transform.
Parameters
- drawing OfficeIMO.Drawing.OfficeDrawing
- x double
- y double
- frameTransform OfficeIMO.Drawing.OfficeImageFrameTransform
Returns
OfficeDrawingpublic OfficeDrawing AddEffectDrawing(OfficeDrawing drawing, OfficeTransform transform, double opacity = 1) #Adds another drawing as one affine-transformed, isolated opacity group.
Parameters
- drawing OfficeIMO.Drawing.OfficeDrawing
- transform OfficeIMO.Drawing.OfficeTransform
- opacity double = 1
Returns
OfficeDrawingpublic OfficeDrawing AddEffectDrawing(OfficeDrawing drawing, OfficeTransform transform, OfficeBlendMode blendMode, OfficeDrawingSoftMask? softMask = null, double opacity = 1) #Adds another drawing as one affine-transformed group with managed blending and an optional vector soft mask.
Parameters
- drawing OfficeIMO.Drawing.OfficeDrawing
- transform OfficeIMO.Drawing.OfficeTransform
- blendMode OfficeIMO.Drawing.OfficeBlendMode
- softMask OfficeIMO.Drawing.OfficeDrawingSoftMask? = null
- opacity double = 1
Returns
OfficeDrawingpublic OfficeDrawing AddFont(string familyName, byte[] data, OfficeFontStyle style = Regular) #Adds or replaces a scoped TrueType face and returns this drawing.
Parameters
- familyName string
- data byte[]
- style OfficeIMO.Drawing.OfficeFontStyle = Regular
Returns
OfficeDrawingpublic OfficeDrawing AddImage(byte[] bytes, string? contentType, OfficeImageProjection projection, string? alternativeText = null, double opacity = 1) #Adds an image using a shared placement/crop/transform projection and returns this drawing.
Parameters
- bytes byte[]
- contentType string?
- projection OfficeIMO.Drawing.OfficeImageProjection
- alternativeText string? = null
- opacity double = 1
Returns
OfficeDrawingpublic OfficeDrawing AddImageBehindContent(byte[] bytes, string? contentType, OfficeImageProjection projection, string? alternativeText = null, double opacity = 1) #Adds an image behind existing foreground content while keeping an initial page background underneath it.
Parameters
- bytes byte[]
- contentType string?
- projection OfficeIMO.Drawing.OfficeImageProjection
- alternativeText string? = null
- opacity double = 1
Returns
OfficeDrawingpublic OfficeDrawing AddImagePattern(byte[] bytes, string? contentType, OfficeImagePatternLayout layout, int maximumTileCount = 16384, double opacity = 1) #Adds a clipped repeating image pattern and returns this drawing.
Parameters
- bytes byte[]
- contentType string?
- layout OfficeIMO.Drawing.OfficeImagePatternLayout
- maximumTileCount int = 16384
- opacity double = 1
Returns
OfficeDrawingpublic OfficeDrawing AddImageWithInterpolation(byte[] bytes, string? contentType, OfficeImageProjection projection, bool interpolate, string? alternativeText = null, double opacity = 1) #Adds an image using explicit scaling interpolation behavior.
Parameters
- bytes byte[]
- contentType string?
- projection OfficeIMO.Drawing.OfficeImageProjection
- interpolate bool
- alternativeText string? = null
- opacity double = 1
Returns
OfficeDrawingpublic OfficeDrawing AddLink(string uri, double x, double y, double width, double height, string? alternativeText = null) #Adds a non-painting interactive link rectangle to the drawing scene.
Parameters
- uri string
- x double
- y double
- width double
- height double
- alternativeText string? = null
Returns
OfficeDrawingpublic OfficeDrawing AddPositionedText(string text, double x, double y, double width, double height, OfficeFontInfo? font, OfficeColor? color, OfficeTextAlignment alignment, double? lineHeight) #Adds an already-positioned single text run. The frame width may be clipped independently from the resolved glyph advance retained for backend-consistent positioning.
Parameters
- text string
- Text content to draw.
- x double
- Horizontal frame position in drawing units.
- y double
- Vertical frame position in drawing units.
- width double
- Clipping frame width in drawing units.
- height double
- Clipping frame height in drawing units.
- font OfficeIMO.Drawing.OfficeFontInfo?
- Optional font descriptor.
- color OfficeIMO.OfficeColor?
- Optional text color.
- alignment OfficeIMO.Drawing.OfficeTextAlignment
- Horizontal alignment inside the frame.
- lineHeight double?
- Optional resolved line height.
public OfficeDrawing AddPositionedText(string text, double x, double y, double width, double height, OfficeFontInfo? font = null, OfficeColor? color = null, OfficeTextAlignment alignment = Left, double? lineHeight = null, double? textAdvanceWidth = null) #Adds an already-positioned single text run with an explicit resolved glyph advance.
Parameters
- text string
- Text content to draw.
- x double
- Horizontal frame position in drawing units.
- y double
- Vertical frame position in drawing units.
- width double
- Clipping frame width in drawing units.
- height double
- Clipping frame height in drawing units.
- font OfficeIMO.Drawing.OfficeFontInfo? = null
- Optional font descriptor.
- color OfficeIMO.OfficeColor? = null
- Optional text color.
- alignment OfficeIMO.Drawing.OfficeTextAlignment = Left
- Horizontal alignment inside the frame.
- lineHeight double? = null
- Optional resolved line height.
- textAdvanceWidth double? = null
- Resolved horizontal glyph advance, or null to use width.
public OfficeDrawing AddPositionedText(string text, double x, double y, double width, double height, OfficeFontInfo? font, OfficeColor? color, OfficeTextAlignment alignment, double? lineHeight, double? textAdvanceWidth, OfficeTextDecorationStyle underlineStyle, OfficeTextDecorationStyle strikethroughStyle, OfficeTextBaseline baseline) #Adds an already-positioned text run with typed decoration and baseline styling.
Parameters
- text string
- x double
- y double
- width double
- height double
- font OfficeIMO.Drawing.OfficeFontInfo?
- color OfficeIMO.OfficeColor?
- alignment OfficeIMO.Drawing.OfficeTextAlignment
- lineHeight double?
- textAdvanceWidth double?
- underlineStyle OfficeIMO.Drawing.OfficeTextDecorationStyle
- strikethroughStyle OfficeIMO.Drawing.OfficeTextDecorationStyle
- baseline OfficeIMO.Drawing.OfficeTextBaseline
Returns
OfficeDrawingpublic OfficeDrawing AddPositionedText(string text, double x, double y, double width, double height, OfficeFontInfo? font, OfficeColor? color, OfficeTextAlignment alignment, double? lineHeight, double? textAdvanceWidth, OfficeTextDecorationStyle underlineStyle, OfficeTextDecorationStyle strikethroughStyle, OfficeTextBaseline baseline, int baselineLevel) #Adds an already-positioned text run with typed decoration and a cumulative script nesting level.
Parameters
- text string
- x double
- y double
- width double
- height double
- font OfficeIMO.Drawing.OfficeFontInfo?
- color OfficeIMO.OfficeColor?
- alignment OfficeIMO.Drawing.OfficeTextAlignment
- lineHeight double?
- textAdvanceWidth double?
- underlineStyle OfficeIMO.Drawing.OfficeTextDecorationStyle
- strikethroughStyle OfficeIMO.Drawing.OfficeTextDecorationStyle
- baseline OfficeIMO.Drawing.OfficeTextBaseline
- baselineLevel int
Returns
OfficeDrawingpublic OfficeDrawing AddPositionedText(string text, double x, double y, double width, double height, OfficeImageFrameTransform frameTransform, OfficeFontInfo? font = null, OfficeColor? color = null, OfficeTextAlignment alignment = Left, double? lineHeight = null, double? textAdvanceWidth = null) #Adds a resolved source text run with its glyph advance and a destination-space rotation or mirror transform. Source text is clipped, never shortened with an ellipsis.
Parameters
- text string
- x double
- y double
- width double
- height double
- frameTransform OfficeIMO.Drawing.OfficeImageFrameTransform
- font OfficeIMO.Drawing.OfficeFontInfo? = null
- color OfficeIMO.OfficeColor? = null
- alignment OfficeIMO.Drawing.OfficeTextAlignment = Left
- lineHeight double? = null
- textAdvanceWidth double? = null
Returns
OfficeDrawingpublic OfficeDrawing AddRichText(IReadOnlyList<OfficeRichTextRun> runs, double x, double y, double width, double height, OfficeTextAlignment alignment = Left, double? lineHeight = null, OfficeTextVerticalAlignment verticalAlignment = Top, double rotationDegrees = 0, double? rotationCenterX = null, double? rotationCenterY = null, bool wrapText = true, bool shrinkToFit = false, bool flipHorizontal = false, bool flipVertical = false, OfficeTextPadding? padding = null, OfficeTextParagraphIndent? paragraphIndent = null) #Adds rich text inside a local drawing rectangle and returns this drawing.
Parameters
- runs System.Collections.Generic.IReadOnlyList<OfficeIMO.Drawing.OfficeRichTextRun>
- x double
- y double
- width double
- height double
- alignment OfficeIMO.Drawing.OfficeTextAlignment = Left
- lineHeight double? = null
- verticalAlignment OfficeIMO.Drawing.OfficeTextVerticalAlignment = Top
- rotationDegrees double = 0
- rotationCenterX double? = null
- rotationCenterY double? = null
- wrapText bool = true
- shrinkToFit bool = false
- flipHorizontal bool = false
- flipVertical bool = false
- padding OfficeIMO.Drawing.OfficeTextPadding? = null
- paragraphIndent OfficeIMO.Drawing.OfficeTextParagraphIndent? = null
Returns
OfficeDrawingpublic OfficeDrawing AddRichTextBehindContent(IReadOnlyList<OfficeRichTextRun> runs, double x, double y, double width, double height, OfficeTextAlignment alignment = Left, double? lineHeight = null, OfficeTextVerticalAlignment verticalAlignment = Top, double rotationDegrees = 0, double? rotationCenterX = null, double? rotationCenterY = null, bool wrapText = true, bool shrinkToFit = false, bool flipHorizontal = false, bool flipVertical = false, OfficeTextPadding? padding = null, OfficeTextParagraphIndent? paragraphIndent = null) #Adds rich text behind existing foreground content while keeping an initial page background underneath it.
Parameters
- runs System.Collections.Generic.IReadOnlyList<OfficeIMO.Drawing.OfficeRichTextRun>
- x double
- y double
- width double
- height double
- alignment OfficeIMO.Drawing.OfficeTextAlignment = Left
- lineHeight double? = null
- verticalAlignment OfficeIMO.Drawing.OfficeTextVerticalAlignment = Top
- rotationDegrees double = 0
- rotationCenterX double? = null
- rotationCenterY double? = null
- wrapText bool = true
- shrinkToFit bool = false
- flipHorizontal bool = false
- flipVertical bool = false
- padding OfficeIMO.Drawing.OfficeTextPadding? = null
- paragraphIndent OfficeIMO.Drawing.OfficeTextParagraphIndent? = null
Returns
OfficeDrawingpublic OfficeDrawing AddRichTextParagraphs(IReadOnlyList<OfficeRichTextParagraph> paragraphs, double x, double y, double width, double height, OfficeTextVerticalAlignment verticalAlignment = Top, bool wrapText = true, OfficeTextPadding? padding = null) #Adds paragraphs with independent styles and render-time font measurement inside one text frame.
Parameters
- paragraphs System.Collections.Generic.IReadOnlyList<OfficeIMO.Drawing.OfficeRichTextParagraph>
- x double
- y double
- width double
- height double
- verticalAlignment OfficeIMO.Drawing.OfficeTextVerticalAlignment = Top
- wrapText bool = true
- padding OfficeIMO.Drawing.OfficeTextPadding? = null
Returns
OfficeDrawingpublic OfficeDrawing AddRichTextParagraphs(IReadOnlyList<OfficeRichTextParagraph> paragraphs, double x, double y, double width, double height, OfficeTextAreaAlignment areaAlignment, OfficeTextVerticalAlignment verticalAlignment = Top, bool wrapText = true, OfficeTextPadding? padding = null) #Adds independently aligned paragraphs in an intrinsically sized text area inside one drawing frame.
Parameters
- paragraphs System.Collections.Generic.IReadOnlyList<OfficeIMO.Drawing.OfficeRichTextParagraph>
- x double
- y double
- width double
- height double
- areaAlignment OfficeIMO.Drawing.OfficeTextAreaAlignment
- verticalAlignment OfficeIMO.Drawing.OfficeTextVerticalAlignment = Top
- wrapText bool = true
- padding OfficeIMO.Drawing.OfficeTextPadding? = null
Returns
OfficeDrawingpublic OfficeDrawing AddShape(OfficeShape shape, double x, double y) #Adds a shape at a local top-left coordinate and returns this drawing.
Parameters
- shape OfficeIMO.Drawing.OfficeShape
- x double
- y double
Returns
OfficeDrawingpublic OfficeDrawing AddShapeBehindContent(OfficeShape shape, double x, double y) #Adds a shape behind existing foreground content while keeping an initial page background underneath it.
Parameters
- shape OfficeIMO.Drawing.OfficeShape
- x double
- y double
Returns
OfficeDrawingpublic OfficeDrawing AddStyledText(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) #Adds text with typed decoration and baseline styling inside a local drawing rectangle.
Parameters
- text string
- x double
- y double
- width double
- height double
- font OfficeIMO.Drawing.OfficeFontInfo?
- color OfficeIMO.OfficeColor?
- alignment OfficeIMO.Drawing.OfficeTextAlignment
- lineHeight double?
- verticalAlignment OfficeIMO.Drawing.OfficeTextVerticalAlignment
- rotationDegrees double
- rotationCenterX double?
- rotationCenterY double?
- wrapText bool
- shrinkToFit bool
- stackedText bool
- flipHorizontal bool
- flipVertical bool
- padding OfficeIMO.Drawing.OfficeTextPadding?
- paragraphIndent OfficeIMO.Drawing.OfficeTextParagraphIndent?
- underlineStyle OfficeIMO.Drawing.OfficeTextDecorationStyle
- strikethroughStyle OfficeIMO.Drawing.OfficeTextDecorationStyle
- baseline OfficeIMO.Drawing.OfficeTextBaseline
Returns
OfficeDrawingpublic OfficeDrawing AddStyledText(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, int baselineLevel) #Adds text with typed decoration and a cumulative script nesting level.
Parameters
- text string
- x double
- y double
- width double
- height double
- font OfficeIMO.Drawing.OfficeFontInfo?
- color OfficeIMO.OfficeColor?
- alignment OfficeIMO.Drawing.OfficeTextAlignment
- lineHeight double?
- verticalAlignment OfficeIMO.Drawing.OfficeTextVerticalAlignment
- rotationDegrees double
- rotationCenterX double?
- rotationCenterY double?
- wrapText bool
- shrinkToFit bool
- stackedText bool
- flipHorizontal bool
- flipVertical bool
- padding OfficeIMO.Drawing.OfficeTextPadding?
- paragraphIndent OfficeIMO.Drawing.OfficeTextParagraphIndent?
- underlineStyle OfficeIMO.Drawing.OfficeTextDecorationStyle
- strikethroughStyle OfficeIMO.Drawing.OfficeTextDecorationStyle
- baseline OfficeIMO.Drawing.OfficeTextBaseline
- baselineLevel int
Returns
OfficeDrawingpublic OfficeDrawing AddText(string text, double x, double y, double width, double height, OfficeFontInfo? font, OfficeColor? color, OfficeTextAlignment alignment, double? lineHeight) #Adds unrotated text using the original public text-box contract.
Parameters
- text string
- x double
- y double
- width double
- height double
- font OfficeIMO.Drawing.OfficeFontInfo?
- color OfficeIMO.OfficeColor?
- alignment OfficeIMO.Drawing.OfficeTextAlignment
- lineHeight double?
Returns
OfficeDrawingpublic OfficeDrawing AddText(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) #Adds text inside a local drawing rectangle and returns this drawing.
Parameters
- text string
- x double
- y double
- width double
- height double
- font OfficeIMO.Drawing.OfficeFontInfo? = null
- color OfficeIMO.OfficeColor? = null
- alignment OfficeIMO.Drawing.OfficeTextAlignment = Left
- lineHeight double? = null
- verticalAlignment OfficeIMO.Drawing.OfficeTextVerticalAlignment = Top
- rotationDegrees double = 0
- rotationCenterX double? = null
- rotationCenterY double? = null
- wrapText bool = false
- shrinkToFit bool = false
- stackedText bool = false
- flipHorizontal bool = false
- flipVertical bool = false
- padding OfficeIMO.Drawing.OfficeTextPadding? = null
- paragraphIndent OfficeIMO.Drawing.OfficeTextParagraphIndent? = null
Returns
OfficeDrawingpublic OfficeDrawing AddTextBehindContent(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) #Adds text behind existing foreground content while keeping an initial page background underneath it.
Parameters
- text string
- x double
- y double
- width double
- height double
- font OfficeIMO.Drawing.OfficeFontInfo? = null
- color OfficeIMO.OfficeColor? = null
- alignment OfficeIMO.Drawing.OfficeTextAlignment = Left
- lineHeight double? = null
- verticalAlignment OfficeIMO.Drawing.OfficeTextVerticalAlignment = Top
- rotationDegrees double = 0
- rotationCenterX double? = null
- rotationCenterY double? = null
- wrapText bool = false
- shrinkToFit bool = false
- stackedText bool = false
- flipHorizontal bool = false
- flipVertical bool = false
- padding OfficeIMO.Drawing.OfficeTextPadding? = null
- paragraphIndent OfficeIMO.Drawing.OfficeTextParagraphIndent? = null
Returns
OfficeDrawingpublic OfficeDrawing AddTilingPattern(OfficeDrawing tile, OfficeImagePlacement area, double horizontalStep, double verticalStep, OfficeTransform? transform = null, double originX = 0, double originY = 0, int maximumTileCount = 16384, double opacity = 1) #Adds a clipped, transform-aware vector tiling pattern.
Parameters
- tile OfficeIMO.Drawing.OfficeDrawing
- area OfficeIMO.Drawing.OfficeImagePlacement
- horizontalStep double
- verticalStep double
- transform OfficeIMO.Drawing.OfficeTransform? = null
- originX double = 0
- originY double = 0
- maximumTileCount int = 16384
- opacity double = 1
Returns
OfficeDrawingpublic OfficeDrawing AddTilingPattern(OfficeDrawing tile, OfficeImagePlacement area, double horizontalStep, double verticalStep, bool repeatX, bool repeatY, OfficeTransform? transform = null, double originX = 0, double originY = 0, int maximumTileCount = 16384, double opacity = 1) #Adds a clipped, transform-aware vector tiling pattern with independent axis repetition.
Parameters
- tile OfficeIMO.Drawing.OfficeDrawing
- area OfficeIMO.Drawing.OfficeImagePlacement
- horizontalStep double
- verticalStep double
- repeatX bool
- repeatY bool
- transform OfficeIMO.Drawing.OfficeTransform? = null
- originX double = 0
- originY double = 0
- maximumTileCount int = 16384
- opacity double = 1
Returns
OfficeDrawingpublic OfficeDrawing AddVerticalText(string text, double x, double y, double width, double height, OfficeFontInfo? font = null, OfficeColor? color = null) #Adds top-to-bottom text whose glyph substitutions and advances come from the selected shaping provider.
Parameters
- text string
- x double
- y double
- width double
- height double
- font OfficeIMO.Drawing.OfficeFontInfo? = null
- color OfficeIMO.OfficeColor? = null
Returns
OfficeDrawingpublic OfficeDrawing Clone() #Creates a detached copy of this drawing and all positioned elements.
Returns
OfficeDrawingpublic OfficeImageExportResult ToImage(OfficeImageExportFormat format, OfficeImageExportOptions? options = null, CancellationToken cancellationToken = default) #Exports a detached drawing through the shared density, encoding, font, diagnostic and safety contracts. Options define the drawing's logical units per inch.
Parameters
- format OfficeIMO.Drawing.OfficeImageExportFormat
- options OfficeIMO.Drawing.OfficeImageExportOptions? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
OfficeImageExportResultInherited Methods
Properties
public IReadOnlyList<OfficeDrawingShape> Shapes { get; } #Positioned shapes in paint order.
public IReadOnlyList<OfficeDrawingImage> Images { get; } #Positioned images in paint order.
public IReadOnlyList<OfficeDrawingImagePattern> ImagePatterns { get; } #Clipped image patterns in paint order.
public IReadOnlyList<OfficeDrawingElement> Elements { get; } #Positioned drawing elements in paint order.
public OfficeFontFaceCollection Fonts { get; private set; } #Scoped TrueType faces embedded or rasterized with this drawing.