API Reference
OfficeDrawing
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
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 OfficeChartDrawingRenderer.Render
- Method OfficeChartDrawingRenderer.Render
- Property OfficeChartRenderingResult.Drawing
- Method OfficeConicGradient.CreateDrawing
- Method OfficeDiagramDrawingRenderer.Render
- Method OfficeDiagramDrawingRenderer.Render
- Extension method OfficeDrawing.ApplyImageExportOptions
- Method OfficeDrawing.AddActualTextDrawing
- Method OfficeDrawing.AddBorderBox
- Method OfficeDrawing.AddClippedDrawing
- Method OfficeDrawing.AddClippedDrawing
- Method OfficeDrawing.AddClippedDrawing
- Method OfficeDrawing.AddClippedDrawing
- Method OfficeDrawing.AddClippedImage
- Method OfficeDrawing.AddClippedImageWithInterpolation
- Method OfficeDrawing.AddClippedPositionedText
- Method OfficeDrawing.AddClippedPositionedText
- Method OfficeDrawing.AddClippedText
- Method OfficeDrawing.AddDrawing
- Method OfficeDrawing.AddDrawing
- Method OfficeDrawing.AddEffectDrawing
- 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.AddPositionedText
- Method OfficeDrawing.AddPositionedText
- Method OfficeDrawing.AddPositionedText
- Method OfficeDrawing.AddPositionedText
- Method OfficeDrawing.AddRichText
- Method OfficeDrawing.AddRichTextBehindContent
- Method OfficeDrawing.AddShape
- Method OfficeDrawing.AddShapeBehindContent
- Method OfficeDrawing.AddStyledText
- Method OfficeDrawing.AddStyledText
- Method OfficeDrawing.AddText
- Method OfficeDrawing.AddText
- Method OfficeDrawing.AddTextBehindContent
- Method OfficeDrawing.AddTilingPattern
- Method OfficeDrawing.AddTilingPattern
- Method OfficeDrawing.AddVerticalText
- Method OfficeDrawing.Clone
- Property OfficeDrawingEffectGroup.Drawing
- Property OfficeDrawingGroup.Drawing
- Method OfficeDrawingImageExportExtensions.ApplyImageExportOptions
- Property OfficeDrawingSoftMask.Drawing
- Property OfficeDrawingTilingPattern.Tile
- Method OfficeInkRenderer.Render
- Method OfficeMathRenderer.Render
- Method OfficeSvgForeignObjectRenderer.EndInvoke
- Method OfficeSvgForeignObjectRenderer.Invoke
Accepted by parameters
- Constructor OfficeChartRenderingResult.OfficeChartRenderingResult
- Extension method OfficeDrawing.AppendFontDiagnostics
- Extension method OfficeDrawing.ApplyImageExportOptions
- Method OfficeDrawing.AddActualTextDrawing
- Method OfficeDrawing.AddClippedDrawing
- Method OfficeDrawing.AddClippedDrawing
- Method OfficeDrawing.AddClippedDrawing
- Method OfficeDrawing.AddClippedDrawing
- Method OfficeDrawing.AddDrawing
- Method OfficeDrawing.AddDrawing
- Method OfficeDrawing.AddEffectDrawing
- Method OfficeDrawing.AddEffectDrawing
- Method OfficeDrawing.AddTilingPattern
- Method OfficeDrawing.AddTilingPattern
- Constructor OfficeDrawingEffectGroup.OfficeDrawingEffectGroup
- Constructor OfficeDrawingEffectGroup.OfficeDrawingEffectGroup
- Constructor OfficeDrawingGroup.OfficeDrawingGroup
- Constructor OfficeDrawingGroup.OfficeDrawingGroup
- Constructor OfficeDrawingGroup.OfficeDrawingGroup
- Constructor OfficeDrawingGroup.OfficeDrawingGroup
- Method OfficeDrawingImageExportExtensions.ApplyImageExportOptions
- Method OfficeDrawingQualityAnalyzer.Analyze
- Method OfficeDrawingRasterRenderer.Render
- Method OfficeDrawingRasterRenderer.Render
- Method OfficeDrawingRasterRenderer.ToPng
- Method OfficeDrawingRasterRenderer.ToPng
- Constructor OfficeDrawingSoftMask.OfficeDrawingSoftMask
- Constructor OfficeDrawingSoftMask.OfficeDrawingSoftMask
- Method OfficeDrawingSoftMask.CreateWithLuminosityStandard
- Method OfficeDrawingSvgExporter.ToSvg
- Method OfficeDrawingSvgExporter.ToSvg
- Method OfficeDrawingSvgExporter.ToSvg
- Method OfficeDrawingSvgExporter.ToSvg
- Method OfficeDrawingSvgExporter.ToSvg
- Method OfficeDrawingSvgExporter.ToSvg
- Method OfficeDrawingSvgExporter.ToSvgBytes
- Method OfficeDrawingSvgExporter.ToSvgBytes
- Method OfficeDrawingSvgExporter.ToSvgBytes
- Method OfficeDrawingSvgExporter.ToSvgBytes
- Method OfficeDrawingSvgExporter.ToSvgBytes
- Method OfficeDrawingSvgExporter.ToSvgBytes
- Constructor OfficeDrawingTilingPattern.OfficeDrawingTilingPattern
- Constructor OfficeDrawingTilingPattern.OfficeDrawingTilingPattern
- Method OfficeImageExportFontDiagnostics.AppendFontDiagnostics
- Method OfficeInkRenderer.AddToDrawing
- Method OfficeMathRenderer.AddToDrawing
- Method OfficeSvgDrawingReader.TryRead
- Method OfficeSvgDrawingReader.TryRead
- Method OfficeSvgDrawingReader.TryRead
- Method OfficeSvgDrawingReader.TryRead
Constructors
public OfficeDrawing(Double width, Double height) #Creates a drawing canvas.
Parameters
- width System.Double
- height System.Double
Methods
public OfficeDrawing AddActualTextDrawing(String actualText, OfficeDrawing drawing, Double actualTextAnchorX, Double actualTextAnchorY) #OfficeDrawingAdds 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 System.String
- drawing OfficeIMO.Drawing.OfficeDrawing
- actualTextAnchorX System.Double
- actualTextAnchorY System.Double
public OfficeDrawing AddBorderBox(Double x, Double y, Double width, Double height, Nullable<OfficeColor> fillColor, OfficeBorderBox borders, Nullable<OfficeTransform> transform = null) #OfficeDrawingAdds a filled rectangle and independent edge borders in paint order.
Parameters
- x System.Double
- y System.Double
- width System.Double
- height System.Double
- fillColor System.Nullable{OfficeIMO.Drawing.OfficeColor}
- borders OfficeIMO.Drawing.OfficeBorderBox
- transform System.Nullable{OfficeIMO.Drawing.OfficeTransform} = null
public OfficeDrawing AddClippedDrawing(OfficeDrawing drawing, Double x, Double y, OfficeClipPath clipPath) #OfficeDrawingAdds another drawing as a clipped nested group at a local destination offset.
Parameters
- drawing OfficeIMO.Drawing.OfficeDrawing
- x System.Double
- y System.Double
- clipPath OfficeIMO.Drawing.OfficeClipPath
public OfficeDrawing AddClippedDrawing(OfficeDrawing drawing, Double x, Double y, OfficeClipPath clipPath, OfficeImageFrameTransform frameTransform) #OfficeDrawingAdds another drawing as a clipped nested group at a local destination offset with a shared frame transform.
Parameters
- drawing OfficeIMO.Drawing.OfficeDrawing
- x System.Double
- y System.Double
- clipPath OfficeIMO.Drawing.OfficeClipPath
- frameTransform OfficeIMO.Drawing.OfficeImageFrameTransform
public OfficeDrawing AddClippedDrawing(OfficeDrawing drawing, Double x, Double y, OfficeClipPath clipPath, Double contentOffsetX, Double contentOffsetY) #OfficeDrawingAdds another drawing as a clipped group with an independent content offset.
Parameters
- drawing OfficeIMO.Drawing.OfficeDrawing
- x System.Double
- y System.Double
- clipPath OfficeIMO.Drawing.OfficeClipPath
- contentOffsetX System.Double
- contentOffsetY System.Double
public OfficeDrawing AddClippedDrawing(OfficeDrawing drawing, Double x, Double y, OfficeClipPath clipPath, Double contentOffsetX, Double contentOffsetY, OfficeImageFrameTransform frameTransform) #OfficeDrawingAdds another drawing as a clipped group with independent content offset and frame transform.
Parameters
- drawing OfficeIMO.Drawing.OfficeDrawing
- x System.Double
- y System.Double
- clipPath OfficeIMO.Drawing.OfficeClipPath
- contentOffsetX System.Double
- contentOffsetY System.Double
- frameTransform OfficeIMO.Drawing.OfficeImageFrameTransform
public OfficeDrawing AddClippedImage(Byte[] bytes, String contentType, OfficeImageProjection projection, Double clipX, Double clipY, OfficeClipPath clipPath, String alternativeText = null, Double opacity = 1) #OfficeDrawingAdds an image clipped by a drawing-local clipping path.
Parameters
- bytes System.Byte[]
- contentType System.String
- projection OfficeIMO.Drawing.OfficeImageProjection
- clipX System.Double
- clipY System.Double
- clipPath OfficeIMO.Drawing.OfficeClipPath
- alternativeText System.String = null
- opacity System.Double = 1
public OfficeDrawing AddClippedImageWithInterpolation(Byte[] bytes, String contentType, OfficeImageProjection projection, Boolean interpolate, Double clipX, Double clipY, OfficeClipPath clipPath, String alternativeText = null, Double opacity = 1) #OfficeDrawingAdds an image with explicit scaling interpolation behavior, clipped by a drawing-local path.
Parameters
- bytes System.Byte[]
- contentType System.String
- projection OfficeIMO.Drawing.OfficeImageProjection
- interpolate System.Boolean
- clipX System.Double
- clipY System.Double
- clipPath OfficeIMO.Drawing.OfficeClipPath
- alternativeText System.String = null
- opacity System.Double = 1
public OfficeDrawing AddClippedPositionedText(String text, Double x, Double y, Double width, Double height, Double clipX, Double clipY, OfficeClipPath clipPath, Nullable<OfficeFontInfo> font = null, Nullable<OfficeColor> color = null, OfficeTextAlignment alignment = Left, Nullable<Double> lineHeight = null, Nullable<Double> textAdvanceWidth = null) #OfficeDrawingAdds 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 System.String
- Text content to draw.
- x System.Double
- Horizontal frame position in drawing units.
- y System.Double
- Vertical frame position in drawing units.
- width System.Double
- Text frame width in drawing units.
- height System.Double
- Text frame height in drawing units.
- clipX System.Double
- Horizontal clip position in drawing units.
- clipY System.Double
- Vertical clip position in drawing units.
- clipPath OfficeIMO.Drawing.OfficeClipPath
- Clip path relative to clipX and clipY.
- font System.Nullable{OfficeIMO.Drawing.OfficeFontInfo} = null
- Optional font descriptor.
- color System.Nullable{OfficeIMO.Drawing.OfficeColor} = null
- Optional text color.
- alignment OfficeIMO.Drawing.OfficeTextAlignment = Left
- Horizontal alignment inside the frame.
- lineHeight System.Nullable{System.Double} = null
- Optional resolved line height.
- textAdvanceWidth System.Nullable{System.Double} = null
- Resolved horizontal glyph advance, or null to use width.
Returns
The current drawing.
public OfficeDrawing AddClippedPositionedText(String text, Double x, Double y, Double width, Double height, Double clipX, Double clipY, OfficeClipPath clipPath, OfficeImageFrameTransform frameTransform, Nullable<OfficeFontInfo> font = null, Nullable<OfficeColor> color = null, OfficeTextAlignment alignment = Left, Nullable<Double> lineHeight = null, Nullable<Double> textAdvanceWidth = null) #OfficeDrawingAdds a transformed source text run inside a drawing-local clip path, retaining the resolved glyph advance and complete source text.
Parameters
- text System.String
- x System.Double
- y System.Double
- width System.Double
- height System.Double
- clipX System.Double
- clipY System.Double
- clipPath OfficeIMO.Drawing.OfficeClipPath
- frameTransform OfficeIMO.Drawing.OfficeImageFrameTransform
- 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
- textAdvanceWidth System.Nullable{System.Double} = null
public OfficeDrawing AddClippedText(String text, Double x, Double y, Double width, Double height, Double clipX, Double clipY, OfficeClipPath clipPath, 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) #OfficeDrawingAdds text clipped by a drawing-local clipping path.
Parameters
- text System.String
- x System.Double
- y System.Double
- width System.Double
- height System.Double
- clipX System.Double
- clipY System.Double
- clipPath OfficeIMO.Drawing.OfficeClipPath
- 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 OfficeDrawing AddDrawing(OfficeDrawing drawing, Double x, Double y) #OfficeDrawingAdds all elements from another drawing at a local destination offset and returns this drawing.
Parameters
- drawing OfficeIMO.Drawing.OfficeDrawing
- x System.Double
- y System.Double
public OfficeDrawing AddDrawing(OfficeDrawing drawing, Double x, Double y, OfficeImageFrameTransform frameTransform) #OfficeDrawingAdds all elements from another drawing at a local destination offset with a shared frame transform.
Parameters
- drawing OfficeIMO.Drawing.OfficeDrawing
- x System.Double
- y System.Double
- frameTransform OfficeIMO.Drawing.OfficeImageFrameTransform
public OfficeDrawing AddEffectDrawing(OfficeDrawing drawing, OfficeTransform transform, Double opacity = 1) #OfficeDrawingAdds another drawing as one affine-transformed, isolated opacity group.
Parameters
- drawing OfficeIMO.Drawing.OfficeDrawing
- transform OfficeIMO.Drawing.OfficeTransform
- opacity System.Double = 1
public OfficeDrawing AddEffectDrawing(OfficeDrawing drawing, OfficeTransform transform, OfficeBlendMode blendMode, OfficeDrawingSoftMask softMask = null, Double opacity = 1) #OfficeDrawingAdds 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 System.Double = 1
public OfficeDrawing AddFont(String familyName, Byte[] data, OfficeFontStyle style = Regular) #OfficeDrawingAdds or replaces a scoped TrueType face and returns this drawing.
Parameters
- familyName System.String
- data System.Byte[]
- style OfficeIMO.Drawing.OfficeFontStyle = Regular
public OfficeDrawing AddImage(Byte[] bytes, String contentType, OfficeImageProjection projection, String alternativeText = null, Double opacity = 1) #OfficeDrawingAdds an image using a shared placement/crop/transform projection and returns this drawing.
Parameters
- bytes System.Byte[]
- contentType System.String
- projection OfficeIMO.Drawing.OfficeImageProjection
- alternativeText System.String = null
- opacity System.Double = 1
public OfficeDrawing AddImageBehindContent(Byte[] bytes, String contentType, OfficeImageProjection projection, String alternativeText = null, Double opacity = 1) #OfficeDrawingAdds an image behind existing foreground content while keeping an initial page background underneath it.
Parameters
- bytes System.Byte[]
- contentType System.String
- projection OfficeIMO.Drawing.OfficeImageProjection
- alternativeText System.String = null
- opacity System.Double = 1
public OfficeDrawing AddImagePattern(Byte[] bytes, String contentType, OfficeImagePatternLayout layout, Int32 maximumTileCount = 16384, Double opacity = 1) #OfficeDrawingAdds a clipped repeating image pattern and returns this drawing.
Parameters
- bytes System.Byte[]
- contentType System.String
- layout OfficeIMO.Drawing.OfficeImagePatternLayout
- maximumTileCount System.Int32 = 16384
- opacity System.Double = 1
public OfficeDrawing AddImageWithInterpolation(Byte[] bytes, String contentType, OfficeImageProjection projection, Boolean interpolate, String alternativeText = null, Double opacity = 1) #OfficeDrawingAdds an image using explicit scaling interpolation behavior.
Parameters
- bytes System.Byte[]
- contentType System.String
- projection OfficeIMO.Drawing.OfficeImageProjection
- interpolate System.Boolean
- alternativeText System.String = null
- opacity System.Double = 1
public OfficeDrawing AddLink(String uri, Double x, Double y, Double width, Double height, String alternativeText = null) #OfficeDrawingAdds a non-painting interactive link rectangle to the drawing scene.
Parameters
- uri System.String
- x System.Double
- y System.Double
- width System.Double
- height System.Double
- alternativeText System.String = null
public OfficeDrawing AddPositionedText(String text, Double x, Double y, Double width, Double height, Nullable<OfficeFontInfo> font, Nullable<OfficeColor> color, OfficeTextAlignment alignment, Nullable<Double> lineHeight) #OfficeDrawingAdds 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 System.String
- Text content to draw.
- x System.Double
- Horizontal frame position in drawing units.
- y System.Double
- Vertical frame position in drawing units.
- width System.Double
- Clipping frame width in drawing units.
- height System.Double
- Clipping frame height in drawing units.
- font System.Nullable{OfficeIMO.Drawing.OfficeFontInfo}
- Optional font descriptor.
- color System.Nullable{OfficeIMO.Drawing.OfficeColor}
- Optional text color.
- alignment OfficeIMO.Drawing.OfficeTextAlignment
- Horizontal alignment inside the frame.
- lineHeight System.Nullable{System.Double}
- Optional resolved line height.
Returns
The current drawing.
public OfficeDrawing AddPositionedText(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, Nullable<Double> textAdvanceWidth = null) #OfficeDrawingAdds an already-positioned single text run with an explicit resolved glyph advance.
Parameters
- text System.String
- Text content to draw.
- x System.Double
- Horizontal frame position in drawing units.
- y System.Double
- Vertical frame position in drawing units.
- width System.Double
- Clipping frame width in drawing units.
- height System.Double
- Clipping frame height in drawing units.
- font System.Nullable{OfficeIMO.Drawing.OfficeFontInfo} = null
- Optional font descriptor.
- color System.Nullable{OfficeIMO.Drawing.OfficeColor} = null
- Optional text color.
- alignment OfficeIMO.Drawing.OfficeTextAlignment = Left
- Horizontal alignment inside the frame.
- lineHeight System.Nullable{System.Double} = null
- Optional resolved line height.
- textAdvanceWidth System.Nullable{System.Double} = null
- Resolved horizontal glyph advance, or null to use width.
Returns
The current drawing.
public OfficeDrawing AddPositionedText(String text, Double x, Double y, Double width, Double height, Nullable<OfficeFontInfo> font, Nullable<OfficeColor> color, OfficeTextAlignment alignment, Nullable<Double> lineHeight, Nullable<Double> textAdvanceWidth, OfficeTextDecorationStyle underlineStyle, OfficeTextDecorationStyle strikethroughStyle, OfficeTextBaseline baseline) #OfficeDrawingAdds an already-positioned text run 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}
- textAdvanceWidth System.Nullable{System.Double}
- underlineStyle OfficeIMO.Drawing.OfficeTextDecorationStyle
- strikethroughStyle OfficeIMO.Drawing.OfficeTextDecorationStyle
- baseline OfficeIMO.Drawing.OfficeTextBaseline
public OfficeDrawing AddPositionedText(String text, Double x, Double y, Double width, Double height, Nullable<OfficeFontInfo> font, Nullable<OfficeColor> color, OfficeTextAlignment alignment, Nullable<Double> lineHeight, Nullable<Double> textAdvanceWidth, OfficeTextDecorationStyle underlineStyle, OfficeTextDecorationStyle strikethroughStyle, OfficeTextBaseline baseline, Int32 baselineLevel) #OfficeDrawingAdds an already-positioned text run with typed decoration and a cumulative script nesting level.
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}
- textAdvanceWidth System.Nullable{System.Double}
- underlineStyle OfficeIMO.Drawing.OfficeTextDecorationStyle
- strikethroughStyle OfficeIMO.Drawing.OfficeTextDecorationStyle
- baseline OfficeIMO.Drawing.OfficeTextBaseline
- baselineLevel System.Int32
public OfficeDrawing AddPositionedText(String text, Double x, Double y, Double width, Double height, OfficeImageFrameTransform frameTransform, Nullable<OfficeFontInfo> font = null, Nullable<OfficeColor> color = null, OfficeTextAlignment alignment = Left, Nullable<Double> lineHeight = null, Nullable<Double> textAdvanceWidth = null) #OfficeDrawingAdds 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 System.String
- x System.Double
- y System.Double
- width System.Double
- height System.Double
- frameTransform OfficeIMO.Drawing.OfficeImageFrameTransform
- 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
- textAdvanceWidth System.Nullable{System.Double} = null
public OfficeDrawing AddRichText(IReadOnlyList<OfficeRichTextRun> runs, Double x, Double y, Double width, Double height, OfficeTextAlignment alignment = Left, Nullable<Double> lineHeight = null, OfficeTextVerticalAlignment verticalAlignment = Top, Double rotationDegrees = 0, Nullable<Double> rotationCenterX = null, Nullable<Double> rotationCenterY = null, Boolean wrapText = true, Boolean shrinkToFit = false, Boolean flipHorizontal = false, Boolean flipVertical = false, Nullable<OfficeTextPadding> padding = null, Nullable<OfficeTextParagraphIndent> paragraphIndent = null) #OfficeDrawingAdds rich text inside a local drawing rectangle and returns this drawing.
Parameters
- runs System.Collections.Generic.IReadOnlyList{OfficeIMO.Drawing.OfficeRichTextRun}
- x System.Double
- y System.Double
- width System.Double
- height System.Double
- 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 = true
- shrinkToFit 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 OfficeDrawing AddRichTextBehindContent(IReadOnlyList<OfficeRichTextRun> runs, Double x, Double y, Double width, Double height, OfficeTextAlignment alignment = Left, Nullable<Double> lineHeight = null, OfficeTextVerticalAlignment verticalAlignment = Top, Double rotationDegrees = 0, Nullable<Double> rotationCenterX = null, Nullable<Double> rotationCenterY = null, Boolean wrapText = true, Boolean shrinkToFit = false, Boolean flipHorizontal = false, Boolean flipVertical = false, Nullable<OfficeTextPadding> padding = null, Nullable<OfficeTextParagraphIndent> paragraphIndent = null) #OfficeDrawingAdds rich text behind existing foreground content while keeping an initial page background underneath it.
Parameters
- runs System.Collections.Generic.IReadOnlyList{OfficeIMO.Drawing.OfficeRichTextRun}
- x System.Double
- y System.Double
- width System.Double
- height System.Double
- 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 = true
- shrinkToFit 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 OfficeDrawing AddShape(OfficeShape shape, Double x, Double y) #OfficeDrawingAdds a shape at a local top-left coordinate and returns this drawing.
Parameters
- shape OfficeIMO.Drawing.OfficeShape
- x System.Double
- y System.Double
public OfficeDrawing AddShapeBehindContent(OfficeShape shape, Double x, Double y) #OfficeDrawingAdds a shape behind existing foreground content while keeping an initial page background underneath it.
Parameters
- shape OfficeIMO.Drawing.OfficeShape
- x System.Double
- y System.Double
public OfficeDrawing AddStyledText(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) #OfficeDrawingAdds text with typed decoration and baseline styling inside a local drawing rectangle.
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
public OfficeDrawing AddStyledText(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, Int32 baselineLevel) #OfficeDrawingAdds text with typed decoration and a cumulative script nesting level.
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
- baselineLevel System.Int32
public OfficeDrawing AddText(String text, Double x, Double y, Double width, Double height, Nullable<OfficeFontInfo> font, Nullable<OfficeColor> color, OfficeTextAlignment alignment, Nullable<Double> lineHeight) #OfficeDrawingAdds unrotated text using the original public text-box 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 OfficeDrawing AddText(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) #OfficeDrawingAdds text inside a local drawing rectangle and returns this drawing.
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 OfficeDrawing AddTextBehindContent(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) #OfficeDrawingAdds text behind existing foreground content while keeping an initial page background underneath it.
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 OfficeDrawing AddTilingPattern(OfficeDrawing tile, OfficeImagePlacement area, Double horizontalStep, Double verticalStep, Nullable<OfficeTransform> transform = null, Double originX = 0, Double originY = 0, Int32 maximumTileCount = 16384, Double opacity = 1) #OfficeDrawingAdds a clipped, transform-aware vector tiling pattern.
Parameters
- tile OfficeIMO.Drawing.OfficeDrawing
- area OfficeIMO.Drawing.OfficeImagePlacement
- horizontalStep System.Double
- verticalStep System.Double
- transform System.Nullable{OfficeIMO.Drawing.OfficeTransform} = null
- originX System.Double = 0
- originY System.Double = 0
- maximumTileCount System.Int32 = 16384
- opacity System.Double = 1
public OfficeDrawing AddTilingPattern(OfficeDrawing tile, OfficeImagePlacement area, Double horizontalStep, Double verticalStep, Boolean repeatX, Boolean repeatY, Nullable<OfficeTransform> transform = null, Double originX = 0, Double originY = 0, Int32 maximumTileCount = 16384, Double opacity = 1) #OfficeDrawingAdds a clipped, transform-aware vector tiling pattern with independent axis repetition.
Parameters
- tile OfficeIMO.Drawing.OfficeDrawing
- area OfficeIMO.Drawing.OfficeImagePlacement
- horizontalStep System.Double
- verticalStep System.Double
- repeatX System.Boolean
- repeatY System.Boolean
- transform System.Nullable{OfficeIMO.Drawing.OfficeTransform} = null
- originX System.Double = 0
- originY System.Double = 0
- maximumTileCount System.Int32 = 16384
- opacity System.Double = 1
public OfficeDrawing AddVerticalText(String text, Double x, Double y, Double width, Double height, Nullable<OfficeFontInfo> font = null, Nullable<OfficeColor> color = null) #OfficeDrawingAdds top-to-bottom text whose glyph substitutions and advances come from the selected shaping provider.
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
public OfficeDrawing Clone() #OfficeDrawingCreates a detached copy of this drawing and all positioned elements.
public OfficeImageExportResult ExportImage(OfficeImageExportFormat format, OfficeImageExportOptions options = null, CancellationToken cancellationToken = default) #OfficeImageExportResultExports 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
Inherited Methods
public override Boolean Equals(Object obj) #BooleanParameters
- obj Object
Properties
public Double Width { get; } #Drawing width in the caller's layout unit.
public Double Height { get; } #Drawing height in the caller's layout unit.
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; set; } #Scoped TrueType faces embedded or rasterized with this drawing.
Extension Methods
public static Void AppendFontDiagnostics(OfficeDrawing drawing, ICollection<OfficeImageExportDiagnostic> diagnostics, String source = null) #VoidAdds de-duplicated font diagnostics for all text in a drawing, including nested groups and patterns.
Parameters
- drawing OfficeIMO.Drawing.OfficeDrawing
- diagnostics System.Collections.Generic.ICollection{OfficeIMO.Drawing.OfficeImageExportDiagnostic}
- source System.String = null
public static OfficeDrawing ApplyImageExportOptions(OfficeDrawing drawing, OfficeImageExportOptions options) #OfficeDrawingApplies caller-supplied fonts and text shaping from shared export options to a drawing.
Parameters
- drawing OfficeIMO.Drawing.OfficeDrawing
- options OfficeIMO.Drawing.OfficeImageExportOptions