API Reference
OfficeRasterCanvas
Dependency-free drawing canvas for an OfficeRasterImage.
Inheritance
- Object
- OfficeRasterCanvas
Usage
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Accepted by parameters
- Method OfficeBorderBoxRenderer.DrawRaster
- Method OfficeCalloutRenderer.DrawRaster
- Method OfficeConditionalIconRenderer.DrawRaster
- Method OfficeDataBarRenderer.DrawRaster
- Method OfficeImageComposer.ComposePng
- Method OfficeImageComposer.ComposePng
- Method OfficeImageComposer.ComposeRaster
- Method OfficeImageComposer.ComposeRaster
- Method OfficeImageComposer.ComposeRaster
- Method OfficeImageComposer.ComposeRaster
- Method OfficeImageComposer.ComposeRaster
- Method OfficeImageComposer.ComposeRaster
- Method OfficeSparklineRenderer.DrawRaster
- Method OfficeTextBlockRenderer.DrawRasterRichTextBlock
- Method OfficeTextBlockRenderer.DrawRasterTextBlock
- Method OfficeTextBlockRenderer.DrawRasterTextBlock
- Method OfficeTextBlockRenderer.DrawRasterTextBox
- Method OfficeTextBlockRenderer.DrawRasterTextBox
Constructors
public OfficeRasterCanvas(OfficeRasterImage image, OfficeTrueTypeFont font = null, OfficeFontFaceCollection fonts = null) #Creates a canvas over the supplied image.
Parameters
- image OfficeIMO.Drawing.OfficeRasterImage
- font OfficeIMO.Drawing.OfficeTrueTypeFont = null
- fonts OfficeIMO.Drawing.OfficeFontFaceCollection = null
public OfficeRasterCanvas(OfficeRasterImage image, OfficeTrueTypeFont font, OfficeFontFaceCollection fonts, IOfficeTextShapingProvider textShapingProvider = null, String textShapingLanguage = null, ICollection<OfficeImageExportDiagnostic> diagnosticSink = null, String diagnosticSource = null, CancellationToken cancellationToken = default) #Creates a canvas with complex-text shaping and fidelity diagnostics.
Parameters
- image OfficeIMO.Drawing.OfficeRasterImage
- font OfficeIMO.Drawing.OfficeTrueTypeFont
- fonts OfficeIMO.Drawing.OfficeFontFaceCollection
- textShapingProvider OfficeIMO.Drawing.IOfficeTextShapingProvider = null
- textShapingLanguage System.String = null
- diagnosticSink System.Collections.Generic.ICollection{OfficeIMO.Drawing.OfficeImageExportDiagnostic} = null
- diagnosticSource System.String = null
- cancellationToken System.Threading.CancellationToken = default
public OfficeRasterCanvas(OfficeRasterRenderTarget target, OfficeTrueTypeFont font = null, OfficeFontFaceCollection fonts = null) #Creates a canvas over the supplied supersampled render target.
Parameters
- target OfficeIMO.Drawing.OfficeRasterRenderTarget
- font OfficeIMO.Drawing.OfficeTrueTypeFont = null
- fonts OfficeIMO.Drawing.OfficeFontFaceCollection = null
public OfficeRasterCanvas(OfficeRasterRenderTarget target, OfficeTrueTypeFont font, OfficeFontFaceCollection fonts, IOfficeTextShapingProvider textShapingProvider = null, String textShapingLanguage = null, ICollection<OfficeImageExportDiagnostic> diagnosticSink = null, String diagnosticSource = null, CancellationToken cancellationToken = default) #Creates a supersampled canvas with complex-text shaping and fidelity diagnostics.
Parameters
- target OfficeIMO.Drawing.OfficeRasterRenderTarget
- font OfficeIMO.Drawing.OfficeTrueTypeFont
- fonts OfficeIMO.Drawing.OfficeFontFaceCollection
- textShapingProvider OfficeIMO.Drawing.IOfficeTextShapingProvider = null
- textShapingLanguage System.String = null
- diagnosticSink System.Collections.Generic.ICollection{OfficeIMO.Drawing.OfficeImageExportDiagnostic} = null
- diagnosticSource System.String = null
- cancellationToken System.Threading.CancellationToken = default
Methods
public Void DrawAffineImage(OfficeRasterImage image, OfficeTransform transform, Double opacity, OfficeBlendMode blendMode) #VoidDraws an affine image with managed opacity and blend-mode compositing.
Parameters
- image OfficeIMO.Drawing.OfficeRasterImage
- transform OfficeIMO.Drawing.OfficeTransform
- opacity System.Double
- blendMode OfficeIMO.Drawing.OfficeBlendMode
public Void DrawAffineImage(OfficeRasterImage image, OfficeTransform transform, Double opacity = 1) #VoidDraws an image through an arbitrary destination-space affine transform.
Parameters
- image OfficeIMO.Drawing.OfficeRasterImage
- transform OfficeIMO.Drawing.OfficeTransform
- opacity System.Double = 1
public Void DrawArc(Double centerX, Double centerY, Double radiusX, Double radiusY, Double startDegrees, Double endDegrees, OfficeColor color, Double thickness = 1, Double rotationDegrees = 0, Double rotationCenterX = 0, Double rotationCenterY = 0) #VoidDraws an elliptical arc using center/radius coordinates and optional rotation.
Parameters
- centerX System.Double
- centerY System.Double
- radiusX System.Double
- radiusY System.Double
- startDegrees System.Double
- endDegrees System.Double
- color OfficeIMO.Drawing.OfficeColor
- thickness System.Double = 1
- rotationDegrees System.Double = 0
- rotationCenterX System.Double = 0
- rotationCenterY System.Double = 0
public Void DrawDashedEllipse(Double centerX, Double centerY, Double radiusX, Double radiusY, OfficeColor color, Double thickness = 1, Double dashLength = 6, Double gapLength = 4, Double rotationDegrees = 0, Double rotationCenterX = 0, Double rotationCenterY = 0, Int32 segments = 72, Boolean resetDashPatternForEachSegment = false) #VoidDraws a dashed elliptical outline using center/radius coordinates and optional rotation.
Parameters
- centerX System.Double
- Ellipse center X coordinate.
- centerY System.Double
- Ellipse center Y coordinate.
- radiusX System.Double
- Horizontal ellipse radius.
- radiusY System.Double
- Vertical ellipse radius.
- color OfficeIMO.Drawing.OfficeColor
- Stroke color.
- thickness System.Double = 1
- Stroke thickness in canvas pixels.
- dashLength System.Double = 6
- Visible dash length in canvas pixels.
- gapLength System.Double = 4
- Transparent gap length in canvas pixels.
- rotationDegrees System.Double = 0
- Clockwise rotation in degrees.
- rotationCenterX System.Double = 0
- Rotation center X coordinate.
- rotationCenterY System.Double = 0
- Rotation center Y coordinate.
- segments System.Int32 = 72
- Number of line segments used to approximate the ellipse.
- resetDashPatternForEachSegment System.Boolean = false
- Whether the dash pattern should restart for every approximation segment.
public Void DrawDashedLine(Double x1, Double y1, Double x2, Double y2, OfficeColor color, Double thickness = 1, Double dashLength = 6, Double gapLength = 4) #VoidDraws a dashed line segment.
Parameters
- x1 System.Double
- y1 System.Double
- x2 System.Double
- y2 System.Double
- color OfficeIMO.Drawing.OfficeColor
- thickness System.Double = 1
- dashLength System.Double = 6
- gapLength System.Double = 4
public Void DrawDashedPolyline(IReadOnlyList<ValueTuple<Double, Double>> points, OfficeColor color, Double thickness = 1, Double dashLength = 6, Double gapLength = 4, Boolean resetDashPatternForEachSegment = false) #VoidDraws a dashed polyline through tuple points.
Parameters
- points System.Collections.Generic.IReadOnlyList{System.ValueTuple{System.Double,System.Double}}
- color OfficeIMO.Drawing.OfficeColor
- thickness System.Double = 1
- dashLength System.Double = 6
- gapLength System.Double = 4
- resetDashPatternForEachSegment System.Boolean = false
public Void DrawDashedPolyline(IReadOnlyList<OfficePoint> points, OfficeColor color, Double thickness = 1, Double dashLength = 6, Double gapLength = 4, Boolean resetDashPatternForEachSegment = false) #VoidDraws a dashed polyline through the supplied points.
Parameters
- points System.Collections.Generic.IReadOnlyList{OfficeIMO.Drawing.OfficePoint}
- Polyline points in canvas coordinates.
- color OfficeIMO.Drawing.OfficeColor
- Stroke color.
- thickness System.Double = 1
- Stroke thickness in canvas pixels.
- dashLength System.Double = 6
- Visible dash length in canvas pixels.
- gapLength System.Double = 4
- Transparent gap length in canvas pixels.
- resetDashPatternForEachSegment System.Boolean = false
- Whether the dash pattern should restart for every segment.
public Void DrawEllipse(Double x, Double y, Double width, Double height, OfficeColor color, Double thickness = 1) #VoidDraws an ellipse outline bounded by the supplied rectangle.
Parameters
- x System.Double
- y System.Double
- width System.Double
- height System.Double
- color OfficeIMO.Drawing.OfficeColor
- thickness System.Double = 1
public Void DrawEllipse(Double centerX, Double centerY, Double radiusX, Double radiusY, OfficeColor fill, OfficeColor stroke, Double thickness = 1, Double rotationDegrees = 0, Double rotationCenterX = 0, Double rotationCenterY = 0) #VoidDraws a filled and/or stroked ellipse using center/radius coordinates and optional rotation.
Parameters
- centerX System.Double
- centerY System.Double
- radiusX System.Double
- radiusY System.Double
- fill OfficeIMO.Drawing.OfficeColor
- stroke OfficeIMO.Drawing.OfficeColor
- thickness System.Double = 1
- rotationDegrees System.Double = 0
- rotationCenterX System.Double = 0
- rotationCenterY System.Double = 0
public Void DrawHatchPatternRectangle(Double x, Double y, Double width, Double height, OfficeColor color, Double step, Double lineWidth, OfficeHatchPatternKind pattern) #VoidDraws a shared hatch pattern over the supplied rectangle.
Parameters
- x System.Double
- y System.Double
- width System.Double
- height System.Double
- color OfficeIMO.Drawing.OfficeColor
- step System.Double
- lineWidth System.Double
- pattern OfficeIMO.Drawing.OfficeHatchPatternKind
public Void DrawImage(OfficeRasterImage image, Double x, Double y, Double width, Double height) #VoidDraws an image scaled into the supplied rectangle.
Parameters
- image OfficeIMO.Drawing.OfficeRasterImage
- x System.Double
- y System.Double
- width System.Double
- height System.Double
public Void DrawImage(OfficeRasterImage image, OfficeImageProjection projection) #VoidDraws an image using a shared projection that carries placement, source crop, rotation, and flips.
Parameters
- image OfficeIMO.Drawing.OfficeRasterImage
- Image to draw.
- projection OfficeIMO.Drawing.OfficeImageProjection
- Shared image projection.
public Void DrawImage(OfficeRasterImage image, OfficeImageProjection projection, Boolean interpolate) #VoidDraws an image using a shared projection and the requested sampling behavior.
Parameters
- image OfficeIMO.Drawing.OfficeRasterImage
- projection OfficeIMO.Drawing.OfficeImageProjection
- interpolate System.Boolean
public Void DrawImage(OfficeRasterImage image, Double x, Double y, Double width, Double height, Double sourceLeft, Double sourceTop, Double sourceWidth, Double sourceHeight) #VoidDraws a source rectangle from an image scaled into the supplied destination rectangle. Source coordinates are normalized, where 0 is the left/top edge and 1 is the right/bottom edge.
Parameters
- image OfficeIMO.Drawing.OfficeRasterImage
- x System.Double
- y System.Double
- width System.Double
- height System.Double
- sourceLeft System.Double
- sourceTop System.Double
- sourceWidth System.Double
- sourceHeight System.Double
public Void DrawImage(OfficeRasterImage image, Double x, Double y, Double width, Double height, Double rotationDegrees, Double rotationCenterX, Double rotationCenterY) #VoidDraws an image scaled and rotated around the supplied rotation center.
Parameters
- image OfficeIMO.Drawing.OfficeRasterImage
- x System.Double
- y System.Double
- width System.Double
- height System.Double
- rotationDegrees System.Double
- rotationCenterX System.Double
- rotationCenterY System.Double
public Void DrawImage(OfficeRasterImage image, Double x, Double y, Double width, Double height, Double sourceLeft, Double sourceTop, Double sourceWidth, Double sourceHeight, Double rotationDegrees, Double rotationCenterX, Double rotationCenterY, Boolean flipHorizontal, Boolean flipVertical) #VoidDraws a source rectangle from an image into the supplied destination rectangle with optional rotation and flips. Source coordinates are normalized, where 0 is the left/top edge and 1 is the right/bottom edge.
Parameters
- image OfficeIMO.Drawing.OfficeRasterImage
- x System.Double
- y System.Double
- width System.Double
- height System.Double
- sourceLeft System.Double
- sourceTop System.Double
- sourceWidth System.Double
- sourceHeight System.Double
- rotationDegrees System.Double
- rotationCenterX System.Double
- rotationCenterY System.Double
- flipHorizontal System.Boolean
- flipVertical System.Boolean
public Void DrawImage(OfficeRasterImage image, Double x, Double y, Double width, Double height, Double sourceLeft, Double sourceTop, Double sourceWidth, Double sourceHeight, Double rotationDegrees, Double rotationCenterX, Double rotationCenterY, Boolean flipHorizontal, Boolean flipVertical, Boolean interpolate) #VoidDraws a transformed image with explicit scaling interpolation behavior.
Parameters
- image OfficeIMO.Drawing.OfficeRasterImage
- x System.Double
- y System.Double
- width System.Double
- height System.Double
- sourceLeft System.Double
- sourceTop System.Double
- sourceWidth System.Double
- sourceHeight System.Double
- rotationDegrees System.Double
- rotationCenterX System.Double
- rotationCenterY System.Double
- flipHorizontal System.Boolean
- flipVertical System.Boolean
- interpolate System.Boolean
public Void DrawLine(Double x1, Double y1, Double x2, Double y2, OfficeColor color, Double thickness = 1) #VoidDraws a line segment.
Parameters
- x1 System.Double
- y1 System.Double
- x2 System.Double
- y2 System.Double
- color OfficeIMO.Drawing.OfficeColor
- thickness System.Double = 1
public Void DrawParallelStyledLine(Double x1, Double y1, Double x2, Double y2, OfficeColor color, Double thickness, Double separation, OfficeStrokeDashStyle dashStyle = Solid) #VoidDraws two parallel line segments using a shared Office stroke dash style.
Parameters
- x1 System.Double
- Source line start X coordinate.
- y1 System.Double
- Source line start Y coordinate.
- x2 System.Double
- Source line end X coordinate.
- y2 System.Double
- Source line end Y coordinate.
- color OfficeIMO.Drawing.OfficeColor
- Stroke color.
- thickness System.Double
- Stroke thickness.
- separation System.Double
- Distance between the two parallel line centers.
- dashStyle OfficeIMO.Drawing.OfficeStrokeDashStyle = Solid
- Stroke dash style.
public Void DrawPatternedEllipse(Double centerX, Double centerY, Double radiusX, Double radiusY, OfficeColor color, Double thickness, IReadOnlyList<Double> dashPattern, Double rotationDegrees = 0, Double rotationCenterX = 0, Double rotationCenterY = 0, Int32 segments = 72) #VoidDraws an elliptical outline using an alternating dash and gap pattern.
Parameters
- centerX System.Double
- Ellipse center X coordinate.
- centerY System.Double
- Ellipse center Y coordinate.
- radiusX System.Double
- Horizontal ellipse radius.
- radiusY System.Double
- Vertical ellipse radius.
- color OfficeIMO.Drawing.OfficeColor
- Stroke color.
- thickness System.Double
- Stroke thickness in canvas pixels.
- dashPattern System.Collections.Generic.IReadOnlyList{System.Double}
- Alternating dash and gap lengths in canvas pixels.
- rotationDegrees System.Double = 0
- Clockwise rotation in degrees.
- rotationCenterX System.Double = 0
- Rotation center X coordinate.
- rotationCenterY System.Double = 0
- Rotation center Y coordinate.
- segments System.Int32 = 72
- Number of line segments used to approximate the ellipse.
public Void DrawPatternedLine(Double x1, Double y1, Double x2, Double y2, OfficeColor color, Double thickness, IReadOnlyList<Double> dashPattern) #VoidDraws a line segment using an alternating dash and gap pattern.
Parameters
- x1 System.Double
- y1 System.Double
- x2 System.Double
- y2 System.Double
- color OfficeIMO.Drawing.OfficeColor
- thickness System.Double
- dashPattern System.Collections.Generic.IReadOnlyList{System.Double}
public Void DrawPatternedPolyline(IReadOnlyList<ValueTuple<Double, Double>> points, OfficeColor color, Double thickness, IReadOnlyList<Double> dashPattern, Boolean resetDashPatternForEachSegment = false, Double dashOffset = 0) #VoidDraws connected line segments through tuple points using an alternating dash and gap pattern.
Parameters
- points System.Collections.Generic.IReadOnlyList{System.ValueTuple{System.Double,System.Double}}
- color OfficeIMO.Drawing.OfficeColor
- thickness System.Double
- dashPattern System.Collections.Generic.IReadOnlyList{System.Double}
- resetDashPatternForEachSegment System.Boolean = false
- dashOffset System.Double = 0
public Void DrawPatternedPolyline(IReadOnlyList<OfficePoint> points, OfficeColor color, Double thickness, IReadOnlyList<Double> dashPattern, Boolean resetDashPatternForEachSegment = false, Double dashOffset = 0) #VoidDraws connected line segments through the supplied points using an alternating dash and gap pattern.
Parameters
- points System.Collections.Generic.IReadOnlyList{OfficeIMO.Drawing.OfficePoint}
- Polyline points in canvas coordinates.
- color OfficeIMO.Drawing.OfficeColor
- Stroke color.
- thickness System.Double
- Stroke thickness in canvas pixels.
- dashPattern System.Collections.Generic.IReadOnlyList{System.Double}
- Alternating dash and gap lengths in canvas pixels.
- resetDashPatternForEachSegment System.Boolean = false
- Whether the dash pattern should restart for every segment.
- dashOffset System.Double = 0
- Distance into the dash pattern at which stroking begins.
public Void DrawPolygon(IReadOnlyList<OfficePoint> points, OfficeColor color, Double thickness = 1) #VoidStrokes a polygon outline.
Parameters
- points System.Collections.Generic.IReadOnlyList{OfficeIMO.Drawing.OfficePoint}
- color OfficeIMO.Drawing.OfficeColor
- thickness System.Double = 1
public Void DrawPolyline(IReadOnlyList<ValueTuple<Double, Double>> points, OfficeColor color, Double thickness = 1) #VoidDraws connected line segments through tuple points in canvas coordinates.
Parameters
- points System.Collections.Generic.IReadOnlyList{System.ValueTuple{System.Double,System.Double}}
- color OfficeIMO.Drawing.OfficeColor
- thickness System.Double = 1
public Void DrawPolyline(IReadOnlyList<OfficePoint> points, OfficeColor color, Double thickness = 1) #VoidDraws connected line segments through the supplied points.
Parameters
- points System.Collections.Generic.IReadOnlyList{OfficeIMO.Drawing.OfficePoint}
- Polyline points in canvas coordinates.
- color OfficeIMO.Drawing.OfficeColor
- Stroke color.
- thickness System.Double = 1
- Stroke thickness in canvas pixels.
public Void DrawRectangle(Double x, Double y, Double width, Double height, OfficeColor color, Double thickness = 1) #VoidDraws a rectangle outline.
Parameters
- x System.Double
- y System.Double
- width System.Double
- height System.Double
- color OfficeIMO.Drawing.OfficeColor
- thickness System.Double = 1
public Void DrawStyledEllipse(Double centerX, Double centerY, Double radiusX, Double radiusY, OfficeColor fill, OfficeColor stroke, Double thickness = 1, OfficeStrokeDashStyle dashStyle = Solid, Double rotationDegrees = 0, Double rotationCenterX = 0, Double rotationCenterY = 0, Int32 segments = 72) #VoidDraws a filled and/or stroked ellipse using a shared Office stroke dash style.
Parameters
- centerX System.Double
- Ellipse center X coordinate.
- centerY System.Double
- Ellipse center Y coordinate.
- radiusX System.Double
- Horizontal ellipse radius.
- radiusY System.Double
- Vertical ellipse radius.
- fill OfficeIMO.Drawing.OfficeColor
- Fill color.
- stroke OfficeIMO.Drawing.OfficeColor
- Stroke color.
- thickness System.Double = 1
- Stroke thickness in canvas pixels.
- dashStyle OfficeIMO.Drawing.OfficeStrokeDashStyle = Solid
- Shared Office stroke dash style.
- rotationDegrees System.Double = 0
- Clockwise rotation in degrees.
- rotationCenterX System.Double = 0
- Rotation center X coordinate.
- rotationCenterY System.Double = 0
- Rotation center Y coordinate.
- segments System.Int32 = 72
- Number of line segments used to approximate dashed outlines.
public Void DrawStyledLine(Double x1, Double y1, Double x2, Double y2, OfficeColor color, Double thickness = 1, OfficeStrokeDashStyle dashStyle = Solid) #VoidDraws a line segment using a shared Office stroke dash style.
Parameters
- x1 System.Double
- y1 System.Double
- x2 System.Double
- y2 System.Double
- color OfficeIMO.Drawing.OfficeColor
- thickness System.Double = 1
- dashStyle OfficeIMO.Drawing.OfficeStrokeDashStyle = Solid
public Void DrawStyledPolygon(IReadOnlyList<ValueTuple<Double, Double>> points, OfficeColor color, Double thickness = 1, OfficeStrokeDashStyle dashStyle = Solid, Boolean resetDashPatternForEachSegment = false) #VoidStrokes a polygon outline through tuple points using a shared Office stroke dash style.
Parameters
- points System.Collections.Generic.IReadOnlyList{System.ValueTuple{System.Double,System.Double}}
- color OfficeIMO.Drawing.OfficeColor
- thickness System.Double = 1
- dashStyle OfficeIMO.Drawing.OfficeStrokeDashStyle = Solid
- resetDashPatternForEachSegment System.Boolean = false
public Void DrawStyledPolygon(IReadOnlyList<OfficePoint> points, OfficeColor color, Double thickness = 1, OfficeStrokeDashStyle dashStyle = Solid, Boolean resetDashPatternForEachSegment = false) #VoidStrokes a polygon outline through points using a shared Office stroke dash style.
Parameters
- points System.Collections.Generic.IReadOnlyList{OfficeIMO.Drawing.OfficePoint}
- color OfficeIMO.Drawing.OfficeColor
- thickness System.Double = 1
- dashStyle OfficeIMO.Drawing.OfficeStrokeDashStyle = Solid
- resetDashPatternForEachSegment System.Boolean = false
public Void DrawStyledPolyline(IReadOnlyList<ValueTuple<Double, Double>> points, OfficeColor color, Double thickness = 1, OfficeStrokeDashStyle dashStyle = Solid, Boolean resetDashPatternForEachSegment = false) #VoidDraws connected line segments through tuple points using a shared Office stroke dash style.
Parameters
- points System.Collections.Generic.IReadOnlyList{System.ValueTuple{System.Double,System.Double}}
- color OfficeIMO.Drawing.OfficeColor
- thickness System.Double = 1
- dashStyle OfficeIMO.Drawing.OfficeStrokeDashStyle = Solid
- resetDashPatternForEachSegment System.Boolean = false
public Void DrawStyledPolyline(IReadOnlyList<OfficePoint> points, OfficeColor color, Double thickness = 1, OfficeStrokeDashStyle dashStyle = Solid, Boolean resetDashPatternForEachSegment = false) #VoidDraws connected line segments through the supplied points using a shared Office stroke dash style.
Parameters
- points System.Collections.Generic.IReadOnlyList{OfficeIMO.Drawing.OfficePoint}
- Polyline points in canvas coordinates.
- color OfficeIMO.Drawing.OfficeColor
- Stroke color.
- thickness System.Double = 1
- Stroke thickness in canvas pixels.
- dashStyle OfficeIMO.Drawing.OfficeStrokeDashStyle = Solid
- Shared Office stroke dash style.
- resetDashPatternForEachSegment System.Boolean = false
- Whether the dash pattern should restart for every segment.
public Void DrawText(String text, Double x, Double y, Double width, Double height, OfficeColor color, Double fontSize = 12, OfficeTextAlignment alignment = Left, OfficeFontStyle style = Regular, String fontFamily = null) #VoidDraws text inside a rectangle using a managed TrueType font when available.
Parameters
- text System.String
- x System.Double
- y System.Double
- width System.Double
- height System.Double
- color OfficeIMO.Drawing.OfficeColor
- fontSize System.Double = 12
- alignment OfficeIMO.Drawing.OfficeTextAlignment = Left
- style OfficeIMO.Drawing.OfficeFontStyle = Regular
- fontFamily System.String = null
public Void DrawTextLine(String text, Double anchorX, Double top, Double height, OfficeColor color, Boolean bold = false, Boolean italic = false, OfficeTextAlignment alignment = Center, Double rotationDegrees = 0, Double rotationCenterX = 0, Double rotationCenterY = 0, Boolean underline = false, Boolean strikethrough = false, String fontFamily = null, Boolean flipHorizontal = false, Boolean flipVertical = false) #VoidDraws a single anchored text line with optional bold, italic, alignment, and rotation.
Parameters
- text System.String
- Text to render.
- anchorX System.Double
- Horizontal anchor. Left, center, or right interpretation depends on alignment.
- top System.Double
- Top coordinate of the text line box.
- height System.Double
- Text line height in canvas pixels.
- color OfficeIMO.Drawing.OfficeColor
- Text color.
- bold System.Boolean = false
- Whether to simulate bold rendering.
- italic System.Boolean = false
- Whether to simulate italic rendering.
- alignment OfficeIMO.Drawing.OfficeTextAlignment = Center
- Horizontal alignment relative to anchorX.
- rotationDegrees System.Double = 0
- Clockwise rotation in degrees.
- rotationCenterX System.Double = 0
- Rotation center X coordinate.
- rotationCenterY System.Double = 0
- Rotation center Y coordinate.
- underline System.Boolean = false
- Whether to draw an underline using the measured text width.
- strikethrough System.Boolean = false
- Whether to draw a strikethrough using the measured text width.
- fontFamily System.String = null
- Requested font family fallback list.
- flipHorizontal System.Boolean = false
- Whether to mirror the rendered line horizontally around the rotation center before rotation.
- flipVertical System.Boolean = false
- Whether to mirror the rendered line vertically around the rotation center before rotation.
public Void DrawTextLine(String text, Double anchorX, Double top, Double height, OfficeColor color, Boolean bold, Boolean italic, OfficeTextAlignment alignment, Double rotationDegrees, Double rotationCenterX, Double rotationCenterY, Boolean underline, Boolean strikethrough, String fontFamily, Boolean flipHorizontal, Boolean flipVertical, OfficeTextDecorationStyle underlineStyle, OfficeTextDecorationStyle strikethroughStyle, Nullable<OfficeColor> decorationColor = null) #VoidDraws a single anchored text line with independent underline and strikethrough patterns.
Parameters
- text System.String
- Text to render.
- anchorX System.Double
- Horizontal anchor. Left, center, or right interpretation depends on alignment.
- top System.Double
- Top coordinate of the text line box.
- height System.Double
- Text line height in canvas pixels.
- color OfficeIMO.Drawing.OfficeColor
- Text color.
- bold System.Boolean
- Whether to simulate bold rendering.
- italic System.Boolean
- Whether to simulate italic rendering.
- alignment OfficeIMO.Drawing.OfficeTextAlignment
- Horizontal alignment relative to anchorX.
- rotationDegrees System.Double
- Clockwise rotation in degrees.
- rotationCenterX System.Double
- Rotation center X coordinate.
- rotationCenterY System.Double
- Rotation center Y coordinate.
- underline System.Boolean
- Whether to draw an underline using the measured text width.
- strikethrough System.Boolean
- Whether to draw a strikethrough using the measured text width.
- fontFamily System.String
- Requested font family fallback list.
- flipHorizontal System.Boolean
- Whether to mirror the rendered line horizontally around the rotation center before rotation.
- flipVertical System.Boolean
- Whether to mirror the rendered line vertically around the rotation center before rotation.
- underlineStyle OfficeIMO.Drawing.OfficeTextDecorationStyle
- Underline pattern. A non-none value takes precedence over underline.
- strikethroughStyle OfficeIMO.Drawing.OfficeTextDecorationStyle
- Strikethrough pattern. A non-none value takes precedence over strikethrough.
- decorationColor System.Nullable{OfficeIMO.Drawing.OfficeColor} = null
- Optional underline and strikethrough color. Null uses color.
public Void DrawTextLineTransformed(String text, Double anchorX, Double top, Double height, OfficeColor color, OfficeTransform transform, Boolean bold = false, Boolean italic = false, OfficeTextAlignment alignment = Center, Boolean underline = false, Boolean strikethrough = false, String fontFamily = null) #VoidDraws a single text line through an arbitrary affine transform.
Parameters
- text System.String
- Text to draw.
- anchorX System.Double
- Untransformed text anchor X coordinate.
- top System.Double
- Untransformed top coordinate.
- height System.Double
- Untransformed text height.
- color OfficeIMO.Drawing.OfficeColor
- Text fill color.
- transform OfficeIMO.Drawing.OfficeTransform
- Affine transform applied to text contours.
- bold System.Boolean = false
- Whether to draw a bold approximation.
- italic System.Boolean = false
- Whether to skew text contours before applying the transform.
- alignment OfficeIMO.Drawing.OfficeTextAlignment = Center
- Anchor alignment.
- underline System.Boolean = false
- Whether to draw an underline.
- strikethrough System.Boolean = false
- Whether to draw a strikethrough.
- fontFamily System.String = null
- Requested font family fallback list.
public Void FillEllipse(Double x, Double y, Double width, Double height, OfficeColor color) #VoidFills an ellipse bounded by the supplied rectangle.
Parameters
- x System.Double
- y System.Double
- width System.Double
- height System.Double
- color OfficeIMO.Drawing.OfficeColor
public Void FillLinearGradientPolygon(IReadOnlyList<OfficePoint> points, OfficeLinearGradient gradient) #VoidFills a polygon with a linear gradient fitted to the polygon bounds.
Parameters
- points System.Collections.Generic.IReadOnlyList{OfficeIMO.Drawing.OfficePoint}
- gradient OfficeIMO.Drawing.OfficeLinearGradient
public Void FillLinearGradientRectangle(Double x, Double y, Double width, Double height, OfficeLinearGradient gradient) #VoidFills a rectangle with a linear gradient.
Parameters
- x System.Double
- y System.Double
- width System.Double
- height System.Double
- gradient OfficeIMO.Drawing.OfficeLinearGradient
public Void FillPolygon(IReadOnlyList<OfficePoint> points, OfficeColor color) #VoidFills a polygon.
Parameters
- points System.Collections.Generic.IReadOnlyList{OfficeIMO.Drawing.OfficePoint}
- color OfficeIMO.Drawing.OfficeColor
public Void FillPolygon(IReadOnlyList<ValueTuple<Double, Double>> points, OfficeColor color) #VoidFills a polygon described by tuple points.
Parameters
- points System.Collections.Generic.IReadOnlyList{System.ValueTuple{System.Double,System.Double}}
- color OfficeIMO.Drawing.OfficeColor
public Void FillPolygonsEvenOdd(IReadOnlyList<IReadOnlyList<OfficePoint>> contours, OfficeColor color) #VoidFills multiple polygon contours using the even-odd fill rule.
Parameters
- contours System.Collections.Generic.IReadOnlyList{System.Collections.Generic.IReadOnlyList{OfficeIMO.Drawing.OfficePoint}}
- color OfficeIMO.Drawing.OfficeColor
public Void FillPolygonsEvenOdd(IReadOnlyList<IReadOnlyList<ValueTuple<Double, Double>>> contours, OfficeColor color) #VoidFills multiple tuple-point polygon contours using the even-odd fill rule.
Parameters
- contours System.Collections.Generic.IReadOnlyList{System.Collections.Generic.IReadOnlyList{System.ValueTuple{System.Double,System.Double}}}
- color OfficeIMO.Drawing.OfficeColor
public Void FillPolygonsNonZero(IReadOnlyList<IReadOnlyList<OfficePoint>> contours, OfficeColor color) #VoidFills multiple polygon contours using the non-zero winding fill rule.
Parameters
- contours System.Collections.Generic.IReadOnlyList{System.Collections.Generic.IReadOnlyList{OfficeIMO.Drawing.OfficePoint}}
- color OfficeIMO.Drawing.OfficeColor
public Void FillRadialGradientPolygon(IReadOnlyList<OfficePoint> points, OfficeRadialGradient gradient) #VoidFills a polygon with a radial gradient.
Parameters
- points System.Collections.Generic.IReadOnlyList{OfficeIMO.Drawing.OfficePoint}
- gradient OfficeIMO.Drawing.OfficeRadialGradient
public Void FillRadialGradientRectangle(Double x, Double y, Double width, Double height, OfficeRadialGradient gradient) #VoidFills a rectangle with a radial gradient.
Parameters
- x System.Double
- y System.Double
- width System.Double
- height System.Double
- gradient OfficeIMO.Drawing.OfficeRadialGradient
public Void FillRectangle(Double x, Double y, Double width, Double height, OfficeColor color) #VoidFills a rectangle.
Parameters
- x System.Double
- y System.Double
- width System.Double
- height System.Double
- color OfficeIMO.Drawing.OfficeColor
public Double MeasureText(String text, Double fontSize = 12) #DoubleMeasures text width with the managed font fallback used by this canvas.
Parameters
- text System.String
- fontSize System.Double = 12
public Double MeasureText(String text, Double fontSize, String fontFamily) #DoubleMeasures text width with the requested font family when it can be resolved without platform font APIs.
Parameters
- text System.String
- fontSize System.Double
- fontFamily System.String
public Double MeasureText(String text, Double fontSize, String fontFamily, OfficeFontStyle style) #DoubleMeasures text width with a requested family and bold/italic scoped face when available.
Parameters
- text System.String
- fontSize System.Double
- fontFamily System.String
- style OfficeIMO.Drawing.OfficeFontStyle
public IDisposable PushClipPolygon(IReadOnlyList<OfficePoint> points) #IDisposableRestricts subsequent raster drawing to the supplied polygon until the returned scope is disposed. Nested clips are intersected with the current clip.
Parameters
- points System.Collections.Generic.IReadOnlyList{OfficeIMO.Drawing.OfficePoint}
- Polygon points in canvas coordinates.
Returns
A disposable scope that restores the previous clip.
public IDisposable PushClipPolygonsEvenOdd(IReadOnlyList<IReadOnlyList<OfficePoint>> contours) #IDisposableRestricts subsequent raster drawing to the supplied even-odd contours until the returned scope is disposed. Nested clips are intersected with the current clip.
Parameters
- contours System.Collections.Generic.IReadOnlyList{System.Collections.Generic.IReadOnlyList{OfficeIMO.Drawing.OfficePoint}}
- Closed contours in canvas coordinates.
Returns
A disposable scope that restores the previous clip.
public IDisposable PushClipPolygonsNonZero(IReadOnlyList<IReadOnlyList<OfficePoint>> contours) #IDisposableRestricts subsequent raster drawing to the supplied non-zero winding contours until the returned scope is disposed. Nested clips are intersected with the current clip.
Parameters
- contours System.Collections.Generic.IReadOnlyList{System.Collections.Generic.IReadOnlyList{OfficeIMO.Drawing.OfficePoint}}
- Closed contours in canvas coordinates.
Returns
A disposable scope that restores the previous clip.
public IDisposable PushClipRectangle(Double x, Double y, Double width, Double height) #IDisposableRestricts subsequent raster drawing to the supplied rectangular bounds until the returned scope is disposed. Nested clips are intersected with the current clip.
Parameters
- x System.Double
- Left edge of the clipping rectangle.
- y System.Double
- Top edge of the clipping rectangle.
- width System.Double
- Width of the clipping rectangle.
- height System.Double
- Height of the clipping rectangle.
Returns
A disposable scope that restores the previous clip.
Inherited Methods
public override Boolean Equals(Object obj) #BooleanParameters
- obj Object