Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/

API Reference

Class

OfficeRasterCanvas

Namespace OfficeIMO.Drawing
Assembly OfficeIMO.Core
Modifiers sealed

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

Constructors

OfficeRasterCanvas 4 overloads
public OfficeRasterCanvas(OfficeRasterImage image, OfficeTrueTypeFont font = null, OfficeFontFaceCollection fonts = null) #

Creates a canvas over the supplied image.

Parameters

image OfficeIMO.Drawing.OfficeRasterImage requiredposition: 0
font OfficeIMO.Drawing.OfficeTrueTypeFont = null optionalposition: 1
fonts OfficeIMO.Drawing.OfficeFontFaceCollection = null optionalposition: 2
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 requiredposition: 0
font OfficeIMO.Drawing.OfficeTrueTypeFont requiredposition: 1
fonts OfficeIMO.Drawing.OfficeFontFaceCollection requiredposition: 2
textShapingProvider OfficeIMO.Drawing.IOfficeTextShapingProvider = null optionalposition: 3
textShapingLanguage System.String = null optionalposition: 4
diagnosticSink System.Collections.Generic.ICollection{OfficeIMO.Drawing.OfficeImageExportDiagnostic} = null optionalposition: 5
diagnosticSource System.String = null optionalposition: 6
cancellationToken System.Threading.CancellationToken = default optionalposition: 7
public OfficeRasterCanvas(OfficeRasterRenderTarget target, OfficeTrueTypeFont font = null, OfficeFontFaceCollection fonts = null) #

Creates a canvas over the supplied supersampled render target.

Parameters

target OfficeIMO.Drawing.OfficeRasterRenderTarget requiredposition: 0
font OfficeIMO.Drawing.OfficeTrueTypeFont = null optionalposition: 1
fonts OfficeIMO.Drawing.OfficeFontFaceCollection = null optionalposition: 2
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 requiredposition: 0
font OfficeIMO.Drawing.OfficeTrueTypeFont requiredposition: 1
fonts OfficeIMO.Drawing.OfficeFontFaceCollection requiredposition: 2
textShapingProvider OfficeIMO.Drawing.IOfficeTextShapingProvider = null optionalposition: 3
textShapingLanguage System.String = null optionalposition: 4
diagnosticSink System.Collections.Generic.ICollection{OfficeIMO.Drawing.OfficeImageExportDiagnostic} = null optionalposition: 5
diagnosticSource System.String = null optionalposition: 6
cancellationToken System.Threading.CancellationToken = default optionalposition: 7

Methods

DrawAffineImage 2 overloads
public Void DrawAffineImage(OfficeRasterImage image, OfficeTransform transform, Double opacity, OfficeBlendMode blendMode) #
Returns: Void

Draws an affine image with managed opacity and blend-mode compositing.

Parameters

image OfficeIMO.Drawing.OfficeRasterImage requiredposition: 0
transform OfficeIMO.Drawing.OfficeTransform requiredposition: 1
opacity System.Double requiredposition: 2
blendMode OfficeIMO.Drawing.OfficeBlendMode requiredposition: 3
public Void DrawAffineImage(OfficeRasterImage image, OfficeTransform transform, Double opacity = 1) #
Returns: Void

Draws an image through an arbitrary destination-space affine transform.

Parameters

image OfficeIMO.Drawing.OfficeRasterImage requiredposition: 0
transform OfficeIMO.Drawing.OfficeTransform requiredposition: 1
opacity System.Double = 1 optionalposition: 2
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) #
Returns: Void

Draws an elliptical arc using center/radius coordinates and optional rotation.

Parameters

centerX System.Double requiredposition: 0
centerY System.Double requiredposition: 1
radiusX System.Double requiredposition: 2
radiusY System.Double requiredposition: 3
startDegrees System.Double requiredposition: 4
endDegrees System.Double requiredposition: 5
color OfficeIMO.Drawing.OfficeColor requiredposition: 6
thickness System.Double = 1 optionalposition: 7
rotationDegrees System.Double = 0 optionalposition: 8
rotationCenterX System.Double = 0 optionalposition: 9
rotationCenterY System.Double = 0 optionalposition: 10
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) #
Returns: Void

Draws a dashed elliptical outline using center/radius coordinates and optional rotation.

Parameters

centerX System.Double requiredposition: 0
Ellipse center X coordinate.
centerY System.Double requiredposition: 1
Ellipse center Y coordinate.
radiusX System.Double requiredposition: 2
Horizontal ellipse radius.
radiusY System.Double requiredposition: 3
Vertical ellipse radius.
color OfficeIMO.Drawing.OfficeColor requiredposition: 4
Stroke color.
thickness System.Double = 1 optionalposition: 5
Stroke thickness in canvas pixels.
dashLength System.Double = 6 optionalposition: 6
Visible dash length in canvas pixels.
gapLength System.Double = 4 optionalposition: 7
Transparent gap length in canvas pixels.
rotationDegrees System.Double = 0 optionalposition: 8
Clockwise rotation in degrees.
rotationCenterX System.Double = 0 optionalposition: 9
Rotation center X coordinate.
rotationCenterY System.Double = 0 optionalposition: 10
Rotation center Y coordinate.
segments System.Int32 = 72 optionalposition: 11
Number of line segments used to approximate the ellipse.
resetDashPatternForEachSegment System.Boolean = false optionalposition: 12
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) #
Returns: Void

Draws a dashed line segment.

Parameters

x1 System.Double requiredposition: 0
y1 System.Double requiredposition: 1
x2 System.Double requiredposition: 2
y2 System.Double requiredposition: 3
color OfficeIMO.Drawing.OfficeColor requiredposition: 4
thickness System.Double = 1 optionalposition: 5
dashLength System.Double = 6 optionalposition: 6
gapLength System.Double = 4 optionalposition: 7
DrawDashedPolyline 2 overloads
public Void DrawDashedPolyline(IReadOnlyList<ValueTuple<Double, Double>> points, OfficeColor color, Double thickness = 1, Double dashLength = 6, Double gapLength = 4, Boolean resetDashPatternForEachSegment = false) #
Returns: Void

Draws a dashed polyline through tuple points.

Parameters

points System.Collections.Generic.IReadOnlyList{System.ValueTuple{System.Double,System.Double}} requiredposition: 0
color OfficeIMO.Drawing.OfficeColor requiredposition: 1
thickness System.Double = 1 optionalposition: 2
dashLength System.Double = 6 optionalposition: 3
gapLength System.Double = 4 optionalposition: 4
resetDashPatternForEachSegment System.Boolean = false optionalposition: 5
public Void DrawDashedPolyline(IReadOnlyList<OfficePoint> points, OfficeColor color, Double thickness = 1, Double dashLength = 6, Double gapLength = 4, Boolean resetDashPatternForEachSegment = false) #
Returns: Void

Draws a dashed polyline through the supplied points.

Parameters

points System.Collections.Generic.IReadOnlyList{OfficeIMO.Drawing.OfficePoint} requiredposition: 0
Polyline points in canvas coordinates.
color OfficeIMO.Drawing.OfficeColor requiredposition: 1
Stroke color.
thickness System.Double = 1 optionalposition: 2
Stroke thickness in canvas pixels.
dashLength System.Double = 6 optionalposition: 3
Visible dash length in canvas pixels.
gapLength System.Double = 4 optionalposition: 4
Transparent gap length in canvas pixels.
resetDashPatternForEachSegment System.Boolean = false optionalposition: 5
Whether the dash pattern should restart for every segment.
DrawEllipse 2 overloads
public Void DrawEllipse(Double x, Double y, Double width, Double height, OfficeColor color, Double thickness = 1) #
Returns: Void

Draws an ellipse outline bounded by the supplied rectangle.

Parameters

x System.Double requiredposition: 0
y System.Double requiredposition: 1
width System.Double requiredposition: 2
height System.Double requiredposition: 3
color OfficeIMO.Drawing.OfficeColor requiredposition: 4
thickness System.Double = 1 optionalposition: 5
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) #
Returns: Void

Draws a filled and/or stroked ellipse using center/radius coordinates and optional rotation.

Parameters

centerX System.Double requiredposition: 0
centerY System.Double requiredposition: 1
radiusX System.Double requiredposition: 2
radiusY System.Double requiredposition: 3
fill OfficeIMO.Drawing.OfficeColor requiredposition: 4
stroke OfficeIMO.Drawing.OfficeColor requiredposition: 5
thickness System.Double = 1 optionalposition: 6
rotationDegrees System.Double = 0 optionalposition: 7
rotationCenterX System.Double = 0 optionalposition: 8
rotationCenterY System.Double = 0 optionalposition: 9
public Void DrawHatchPatternRectangle(Double x, Double y, Double width, Double height, OfficeColor color, Double step, Double lineWidth, OfficeHatchPatternKind pattern) #
Returns: Void

Draws a shared hatch pattern over the supplied rectangle.

Parameters

x System.Double requiredposition: 0
y System.Double requiredposition: 1
width System.Double requiredposition: 2
height System.Double requiredposition: 3
color OfficeIMO.Drawing.OfficeColor requiredposition: 4
step System.Double requiredposition: 5
lineWidth System.Double requiredposition: 6
pattern OfficeIMO.Drawing.OfficeHatchPatternKind requiredposition: 7
DrawImage 7 overloads
public Void DrawImage(OfficeRasterImage image, Double x, Double y, Double width, Double height) #
Returns: Void

Draws an image scaled into the supplied rectangle.

Parameters

image OfficeIMO.Drawing.OfficeRasterImage requiredposition: 0
x System.Double requiredposition: 1
y System.Double requiredposition: 2
width System.Double requiredposition: 3
height System.Double requiredposition: 4
public Void DrawImage(OfficeRasterImage image, OfficeImageProjection projection) #
Returns: Void

Draws an image using a shared projection that carries placement, source crop, rotation, and flips.

Parameters

image OfficeIMO.Drawing.OfficeRasterImage requiredposition: 0
Image to draw.
projection OfficeIMO.Drawing.OfficeImageProjection requiredposition: 1
Shared image projection.
public Void DrawImage(OfficeRasterImage image, OfficeImageProjection projection, Boolean interpolate) #
Returns: Void

Draws an image using a shared projection and the requested sampling behavior.

Parameters

image OfficeIMO.Drawing.OfficeRasterImage requiredposition: 0
projection OfficeIMO.Drawing.OfficeImageProjection requiredposition: 1
interpolate System.Boolean requiredposition: 2
public Void DrawImage(OfficeRasterImage image, Double x, Double y, Double width, Double height, Double sourceLeft, Double sourceTop, Double sourceWidth, Double sourceHeight) #
Returns: Void

Draws 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 requiredposition: 0
x System.Double requiredposition: 1
y System.Double requiredposition: 2
width System.Double requiredposition: 3
height System.Double requiredposition: 4
sourceLeft System.Double requiredposition: 5
sourceTop System.Double requiredposition: 6
sourceWidth System.Double requiredposition: 7
sourceHeight System.Double requiredposition: 8
public Void DrawImage(OfficeRasterImage image, Double x, Double y, Double width, Double height, Double rotationDegrees, Double rotationCenterX, Double rotationCenterY) #
Returns: Void

Draws an image scaled and rotated around the supplied rotation center.

Parameters

image OfficeIMO.Drawing.OfficeRasterImage requiredposition: 0
x System.Double requiredposition: 1
y System.Double requiredposition: 2
width System.Double requiredposition: 3
height System.Double requiredposition: 4
rotationDegrees System.Double requiredposition: 5
rotationCenterX System.Double requiredposition: 6
rotationCenterY System.Double requiredposition: 7
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) #
Returns: Void

Draws 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 requiredposition: 0
x System.Double requiredposition: 1
y System.Double requiredposition: 2
width System.Double requiredposition: 3
height System.Double requiredposition: 4
sourceLeft System.Double requiredposition: 5
sourceTop System.Double requiredposition: 6
sourceWidth System.Double requiredposition: 7
sourceHeight System.Double requiredposition: 8
rotationDegrees System.Double requiredposition: 9
rotationCenterX System.Double requiredposition: 10
rotationCenterY System.Double requiredposition: 11
flipHorizontal System.Boolean requiredposition: 12
flipVertical System.Boolean requiredposition: 13
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) #
Returns: Void

Draws a transformed image with explicit scaling interpolation behavior.

Parameters

image OfficeIMO.Drawing.OfficeRasterImage requiredposition: 0
x System.Double requiredposition: 1
y System.Double requiredposition: 2
width System.Double requiredposition: 3
height System.Double requiredposition: 4
sourceLeft System.Double requiredposition: 5
sourceTop System.Double requiredposition: 6
sourceWidth System.Double requiredposition: 7
sourceHeight System.Double requiredposition: 8
rotationDegrees System.Double requiredposition: 9
rotationCenterX System.Double requiredposition: 10
rotationCenterY System.Double requiredposition: 11
flipHorizontal System.Boolean requiredposition: 12
flipVertical System.Boolean requiredposition: 13
interpolate System.Boolean requiredposition: 14
public Void DrawLine(Double x1, Double y1, Double x2, Double y2, OfficeColor color, Double thickness = 1) #
Returns: Void

Draws a line segment.

Parameters

x1 System.Double requiredposition: 0
y1 System.Double requiredposition: 1
x2 System.Double requiredposition: 2
y2 System.Double requiredposition: 3
color OfficeIMO.Drawing.OfficeColor requiredposition: 4
thickness System.Double = 1 optionalposition: 5
public Void DrawParallelStyledLine(Double x1, Double y1, Double x2, Double y2, OfficeColor color, Double thickness, Double separation, OfficeStrokeDashStyle dashStyle = Solid) #
Returns: Void

Draws two parallel line segments using a shared Office stroke dash style.

Parameters

x1 System.Double requiredposition: 0
Source line start X coordinate.
y1 System.Double requiredposition: 1
Source line start Y coordinate.
x2 System.Double requiredposition: 2
Source line end X coordinate.
y2 System.Double requiredposition: 3
Source line end Y coordinate.
color OfficeIMO.Drawing.OfficeColor requiredposition: 4
Stroke color.
thickness System.Double requiredposition: 5
Stroke thickness.
separation System.Double requiredposition: 6
Distance between the two parallel line centers.
dashStyle OfficeIMO.Drawing.OfficeStrokeDashStyle = Solid optionalposition: 7
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) #
Returns: Void

Draws an elliptical outline using an alternating dash and gap pattern.

Parameters

centerX System.Double requiredposition: 0
Ellipse center X coordinate.
centerY System.Double requiredposition: 1
Ellipse center Y coordinate.
radiusX System.Double requiredposition: 2
Horizontal ellipse radius.
radiusY System.Double requiredposition: 3
Vertical ellipse radius.
color OfficeIMO.Drawing.OfficeColor requiredposition: 4
Stroke color.
thickness System.Double requiredposition: 5
Stroke thickness in canvas pixels.
dashPattern System.Collections.Generic.IReadOnlyList{System.Double} requiredposition: 6
Alternating dash and gap lengths in canvas pixels.
rotationDegrees System.Double = 0 optionalposition: 7
Clockwise rotation in degrees.
rotationCenterX System.Double = 0 optionalposition: 8
Rotation center X coordinate.
rotationCenterY System.Double = 0 optionalposition: 9
Rotation center Y coordinate.
segments System.Int32 = 72 optionalposition: 10
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) #
Returns: Void

Draws a line segment using an alternating dash and gap pattern.

Parameters

x1 System.Double requiredposition: 0
y1 System.Double requiredposition: 1
x2 System.Double requiredposition: 2
y2 System.Double requiredposition: 3
color OfficeIMO.Drawing.OfficeColor requiredposition: 4
thickness System.Double requiredposition: 5
dashPattern System.Collections.Generic.IReadOnlyList{System.Double} requiredposition: 6
DrawPatternedPolyline 2 overloads
public Void DrawPatternedPolyline(IReadOnlyList<ValueTuple<Double, Double>> points, OfficeColor color, Double thickness, IReadOnlyList<Double> dashPattern, Boolean resetDashPatternForEachSegment = false, Double dashOffset = 0) #
Returns: Void

Draws 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}} requiredposition: 0
color OfficeIMO.Drawing.OfficeColor requiredposition: 1
thickness System.Double requiredposition: 2
dashPattern System.Collections.Generic.IReadOnlyList{System.Double} requiredposition: 3
resetDashPatternForEachSegment System.Boolean = false optionalposition: 4
dashOffset System.Double = 0 optionalposition: 5
public Void DrawPatternedPolyline(IReadOnlyList<OfficePoint> points, OfficeColor color, Double thickness, IReadOnlyList<Double> dashPattern, Boolean resetDashPatternForEachSegment = false, Double dashOffset = 0) #
Returns: Void

Draws connected line segments through the supplied points using an alternating dash and gap pattern.

Parameters

points System.Collections.Generic.IReadOnlyList{OfficeIMO.Drawing.OfficePoint} requiredposition: 0
Polyline points in canvas coordinates.
color OfficeIMO.Drawing.OfficeColor requiredposition: 1
Stroke color.
thickness System.Double requiredposition: 2
Stroke thickness in canvas pixels.
dashPattern System.Collections.Generic.IReadOnlyList{System.Double} requiredposition: 3
Alternating dash and gap lengths in canvas pixels.
resetDashPatternForEachSegment System.Boolean = false optionalposition: 4
Whether the dash pattern should restart for every segment.
dashOffset System.Double = 0 optionalposition: 5
Distance into the dash pattern at which stroking begins.
public Void DrawPolygon(IReadOnlyList<OfficePoint> points, OfficeColor color, Double thickness = 1) #
Returns: Void

Strokes a polygon outline.

Parameters

points System.Collections.Generic.IReadOnlyList{OfficeIMO.Drawing.OfficePoint} requiredposition: 0
color OfficeIMO.Drawing.OfficeColor requiredposition: 1
thickness System.Double = 1 optionalposition: 2
DrawPolyline 2 overloads
public Void DrawPolyline(IReadOnlyList<ValueTuple<Double, Double>> points, OfficeColor color, Double thickness = 1) #
Returns: Void

Draws connected line segments through tuple points in canvas coordinates.

Parameters

points System.Collections.Generic.IReadOnlyList{System.ValueTuple{System.Double,System.Double}} requiredposition: 0
color OfficeIMO.Drawing.OfficeColor requiredposition: 1
thickness System.Double = 1 optionalposition: 2
public Void DrawPolyline(IReadOnlyList<OfficePoint> points, OfficeColor color, Double thickness = 1) #
Returns: Void

Draws connected line segments through the supplied points.

Parameters

points System.Collections.Generic.IReadOnlyList{OfficeIMO.Drawing.OfficePoint} requiredposition: 0
Polyline points in canvas coordinates.
color OfficeIMO.Drawing.OfficeColor requiredposition: 1
Stroke color.
thickness System.Double = 1 optionalposition: 2
Stroke thickness in canvas pixels.
public Void DrawRectangle(Double x, Double y, Double width, Double height, OfficeColor color, Double thickness = 1) #
Returns: Void

Draws a rectangle outline.

Parameters

x System.Double requiredposition: 0
y System.Double requiredposition: 1
width System.Double requiredposition: 2
height System.Double requiredposition: 3
color OfficeIMO.Drawing.OfficeColor requiredposition: 4
thickness System.Double = 1 optionalposition: 5
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) #
Returns: Void

Draws a filled and/or stroked ellipse using a shared Office stroke dash style.

Parameters

centerX System.Double requiredposition: 0
Ellipse center X coordinate.
centerY System.Double requiredposition: 1
Ellipse center Y coordinate.
radiusX System.Double requiredposition: 2
Horizontal ellipse radius.
radiusY System.Double requiredposition: 3
Vertical ellipse radius.
fill OfficeIMO.Drawing.OfficeColor requiredposition: 4
Fill color.
stroke OfficeIMO.Drawing.OfficeColor requiredposition: 5
Stroke color.
thickness System.Double = 1 optionalposition: 6
Stroke thickness in canvas pixels.
dashStyle OfficeIMO.Drawing.OfficeStrokeDashStyle = Solid optionalposition: 7
Shared Office stroke dash style.
rotationDegrees System.Double = 0 optionalposition: 8
Clockwise rotation in degrees.
rotationCenterX System.Double = 0 optionalposition: 9
Rotation center X coordinate.
rotationCenterY System.Double = 0 optionalposition: 10
Rotation center Y coordinate.
segments System.Int32 = 72 optionalposition: 11
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) #
Returns: Void

Draws a line segment using a shared Office stroke dash style.

Parameters

x1 System.Double requiredposition: 0
y1 System.Double requiredposition: 1
x2 System.Double requiredposition: 2
y2 System.Double requiredposition: 3
color OfficeIMO.Drawing.OfficeColor requiredposition: 4
thickness System.Double = 1 optionalposition: 5
dashStyle OfficeIMO.Drawing.OfficeStrokeDashStyle = Solid optionalposition: 6
DrawStyledPolygon 2 overloads
public Void DrawStyledPolygon(IReadOnlyList<ValueTuple<Double, Double>> points, OfficeColor color, Double thickness = 1, OfficeStrokeDashStyle dashStyle = Solid, Boolean resetDashPatternForEachSegment = false) #
Returns: Void

Strokes 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}} requiredposition: 0
color OfficeIMO.Drawing.OfficeColor requiredposition: 1
thickness System.Double = 1 optionalposition: 2
dashStyle OfficeIMO.Drawing.OfficeStrokeDashStyle = Solid optionalposition: 3
resetDashPatternForEachSegment System.Boolean = false optionalposition: 4
public Void DrawStyledPolygon(IReadOnlyList<OfficePoint> points, OfficeColor color, Double thickness = 1, OfficeStrokeDashStyle dashStyle = Solid, Boolean resetDashPatternForEachSegment = false) #
Returns: Void

Strokes a polygon outline through points using a shared Office stroke dash style.

Parameters

points System.Collections.Generic.IReadOnlyList{OfficeIMO.Drawing.OfficePoint} requiredposition: 0
color OfficeIMO.Drawing.OfficeColor requiredposition: 1
thickness System.Double = 1 optionalposition: 2
dashStyle OfficeIMO.Drawing.OfficeStrokeDashStyle = Solid optionalposition: 3
resetDashPatternForEachSegment System.Boolean = false optionalposition: 4
DrawStyledPolyline 2 overloads
public Void DrawStyledPolyline(IReadOnlyList<ValueTuple<Double, Double>> points, OfficeColor color, Double thickness = 1, OfficeStrokeDashStyle dashStyle = Solid, Boolean resetDashPatternForEachSegment = false) #
Returns: Void

Draws 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}} requiredposition: 0
color OfficeIMO.Drawing.OfficeColor requiredposition: 1
thickness System.Double = 1 optionalposition: 2
dashStyle OfficeIMO.Drawing.OfficeStrokeDashStyle = Solid optionalposition: 3
resetDashPatternForEachSegment System.Boolean = false optionalposition: 4
public Void DrawStyledPolyline(IReadOnlyList<OfficePoint> points, OfficeColor color, Double thickness = 1, OfficeStrokeDashStyle dashStyle = Solid, Boolean resetDashPatternForEachSegment = false) #
Returns: Void

Draws connected line segments through the supplied points using a shared Office stroke dash style.

Parameters

points System.Collections.Generic.IReadOnlyList{OfficeIMO.Drawing.OfficePoint} requiredposition: 0
Polyline points in canvas coordinates.
color OfficeIMO.Drawing.OfficeColor requiredposition: 1
Stroke color.
thickness System.Double = 1 optionalposition: 2
Stroke thickness in canvas pixels.
dashStyle OfficeIMO.Drawing.OfficeStrokeDashStyle = Solid optionalposition: 3
Shared Office stroke dash style.
resetDashPatternForEachSegment System.Boolean = false optionalposition: 4
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) #
Returns: Void

Draws text inside a rectangle using a managed TrueType font when available.

Parameters

text System.String requiredposition: 0
x System.Double requiredposition: 1
y System.Double requiredposition: 2
width System.Double requiredposition: 3
height System.Double requiredposition: 4
color OfficeIMO.Drawing.OfficeColor requiredposition: 5
fontSize System.Double = 12 optionalposition: 6
alignment OfficeIMO.Drawing.OfficeTextAlignment = Left optionalposition: 7
style OfficeIMO.Drawing.OfficeFontStyle = Regular optionalposition: 8
fontFamily System.String = null optionalposition: 9
DrawTextLine 2 overloads
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) #
Returns: Void

Draws a single anchored text line with optional bold, italic, alignment, and rotation.

Parameters

text System.String requiredposition: 0
Text to render.
anchorX System.Double requiredposition: 1
Horizontal anchor. Left, center, or right interpretation depends on alignment.
top System.Double requiredposition: 2
Top coordinate of the text line box.
height System.Double requiredposition: 3
Text line height in canvas pixels.
color OfficeIMO.Drawing.OfficeColor requiredposition: 4
Text color.
bold System.Boolean = false optionalposition: 5
Whether to simulate bold rendering.
italic System.Boolean = false optionalposition: 6
Whether to simulate italic rendering.
alignment OfficeIMO.Drawing.OfficeTextAlignment = Center optionalposition: 7
Horizontal alignment relative to anchorX.
rotationDegrees System.Double = 0 optionalposition: 8
Clockwise rotation in degrees.
rotationCenterX System.Double = 0 optionalposition: 9
Rotation center X coordinate.
rotationCenterY System.Double = 0 optionalposition: 10
Rotation center Y coordinate.
underline System.Boolean = false optionalposition: 11
Whether to draw an underline using the measured text width.
strikethrough System.Boolean = false optionalposition: 12
Whether to draw a strikethrough using the measured text width.
fontFamily System.String = null optionalposition: 13
Requested font family fallback list.
flipHorizontal System.Boolean = false optionalposition: 14
Whether to mirror the rendered line horizontally around the rotation center before rotation.
flipVertical System.Boolean = false optionalposition: 15
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) #
Returns: Void

Draws a single anchored text line with independent underline and strikethrough patterns.

Parameters

text System.String requiredposition: 0
Text to render.
anchorX System.Double requiredposition: 1
Horizontal anchor. Left, center, or right interpretation depends on alignment.
top System.Double requiredposition: 2
Top coordinate of the text line box.
height System.Double requiredposition: 3
Text line height in canvas pixels.
color OfficeIMO.Drawing.OfficeColor requiredposition: 4
Text color.
bold System.Boolean requiredposition: 5
Whether to simulate bold rendering.
italic System.Boolean requiredposition: 6
Whether to simulate italic rendering.
alignment OfficeIMO.Drawing.OfficeTextAlignment requiredposition: 7
Horizontal alignment relative to anchorX.
rotationDegrees System.Double requiredposition: 8
Clockwise rotation in degrees.
rotationCenterX System.Double requiredposition: 9
Rotation center X coordinate.
rotationCenterY System.Double requiredposition: 10
Rotation center Y coordinate.
underline System.Boolean requiredposition: 11
Whether to draw an underline using the measured text width.
strikethrough System.Boolean requiredposition: 12
Whether to draw a strikethrough using the measured text width.
fontFamily System.String requiredposition: 13
Requested font family fallback list.
flipHorizontal System.Boolean requiredposition: 14
Whether to mirror the rendered line horizontally around the rotation center before rotation.
flipVertical System.Boolean requiredposition: 15
Whether to mirror the rendered line vertically around the rotation center before rotation.
underlineStyle OfficeIMO.Drawing.OfficeTextDecorationStyle requiredposition: 16
Underline pattern. A non-none value takes precedence over underline.
strikethroughStyle OfficeIMO.Drawing.OfficeTextDecorationStyle requiredposition: 17
Strikethrough pattern. A non-none value takes precedence over strikethrough.
decorationColor System.Nullable{OfficeIMO.Drawing.OfficeColor} = null optionalposition: 18
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) #
Returns: Void

Draws a single text line through an arbitrary affine transform.

Parameters

text System.String requiredposition: 0
Text to draw.
anchorX System.Double requiredposition: 1
Untransformed text anchor X coordinate.
top System.Double requiredposition: 2
Untransformed top coordinate.
height System.Double requiredposition: 3
Untransformed text height.
color OfficeIMO.Drawing.OfficeColor requiredposition: 4
Text fill color.
transform OfficeIMO.Drawing.OfficeTransform requiredposition: 5
Affine transform applied to text contours.
bold System.Boolean = false optionalposition: 6
Whether to draw a bold approximation.
italic System.Boolean = false optionalposition: 7
Whether to skew text contours before applying the transform.
alignment OfficeIMO.Drawing.OfficeTextAlignment = Center optionalposition: 8
Anchor alignment.
underline System.Boolean = false optionalposition: 9
Whether to draw an underline.
strikethrough System.Boolean = false optionalposition: 10
Whether to draw a strikethrough.
fontFamily System.String = null optionalposition: 11
Requested font family fallback list.
public Void FillEllipse(Double x, Double y, Double width, Double height, OfficeColor color) #
Returns: Void

Fills an ellipse bounded by the supplied rectangle.

Parameters

x System.Double requiredposition: 0
y System.Double requiredposition: 1
width System.Double requiredposition: 2
height System.Double requiredposition: 3
color OfficeIMO.Drawing.OfficeColor requiredposition: 4
public Void FillLinearGradientPolygon(IReadOnlyList<OfficePoint> points, OfficeLinearGradient gradient) #
Returns: Void

Fills a polygon with a linear gradient fitted to the polygon bounds.

Parameters

points System.Collections.Generic.IReadOnlyList{OfficeIMO.Drawing.OfficePoint} requiredposition: 0
gradient OfficeIMO.Drawing.OfficeLinearGradient requiredposition: 1
public Void FillLinearGradientRectangle(Double x, Double y, Double width, Double height, OfficeLinearGradient gradient) #
Returns: Void

Fills a rectangle with a linear gradient.

Parameters

x System.Double requiredposition: 0
y System.Double requiredposition: 1
width System.Double requiredposition: 2
height System.Double requiredposition: 3
gradient OfficeIMO.Drawing.OfficeLinearGradient requiredposition: 4
FillPolygon 2 overloads
public Void FillPolygon(IReadOnlyList<OfficePoint> points, OfficeColor color) #
Returns: Void

Fills a polygon.

Parameters

points System.Collections.Generic.IReadOnlyList{OfficeIMO.Drawing.OfficePoint} requiredposition: 0
color OfficeIMO.Drawing.OfficeColor requiredposition: 1
public Void FillPolygon(IReadOnlyList<ValueTuple<Double, Double>> points, OfficeColor color) #
Returns: Void

Fills a polygon described by tuple points.

Parameters

points System.Collections.Generic.IReadOnlyList{System.ValueTuple{System.Double,System.Double}} requiredposition: 0
color OfficeIMO.Drawing.OfficeColor requiredposition: 1
FillPolygonsEvenOdd 2 overloads
public Void FillPolygonsEvenOdd(IReadOnlyList<IReadOnlyList<OfficePoint>> contours, OfficeColor color) #
Returns: Void

Fills multiple polygon contours using the even-odd fill rule.

Parameters

contours System.Collections.Generic.IReadOnlyList{System.Collections.Generic.IReadOnlyList{OfficeIMO.Drawing.OfficePoint}} requiredposition: 0
color OfficeIMO.Drawing.OfficeColor requiredposition: 1
public Void FillPolygonsEvenOdd(IReadOnlyList<IReadOnlyList<ValueTuple<Double, Double>>> contours, OfficeColor color) #
Returns: Void

Fills 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}}} requiredposition: 0
color OfficeIMO.Drawing.OfficeColor requiredposition: 1
public Void FillPolygonsNonZero(IReadOnlyList<IReadOnlyList<OfficePoint>> contours, OfficeColor color) #
Returns: Void

Fills multiple polygon contours using the non-zero winding fill rule.

Parameters

contours System.Collections.Generic.IReadOnlyList{System.Collections.Generic.IReadOnlyList{OfficeIMO.Drawing.OfficePoint}} requiredposition: 0
color OfficeIMO.Drawing.OfficeColor requiredposition: 1
public Void FillRadialGradientPolygon(IReadOnlyList<OfficePoint> points, OfficeRadialGradient gradient) #
Returns: Void

Fills a polygon with a radial gradient.

Parameters

points System.Collections.Generic.IReadOnlyList{OfficeIMO.Drawing.OfficePoint} requiredposition: 0
gradient OfficeIMO.Drawing.OfficeRadialGradient requiredposition: 1
public Void FillRadialGradientRectangle(Double x, Double y, Double width, Double height, OfficeRadialGradient gradient) #
Returns: Void

Fills a rectangle with a radial gradient.

Parameters

x System.Double requiredposition: 0
y System.Double requiredposition: 1
width System.Double requiredposition: 2
height System.Double requiredposition: 3
gradient OfficeIMO.Drawing.OfficeRadialGradient requiredposition: 4
public Void FillRectangle(Double x, Double y, Double width, Double height, OfficeColor color) #
Returns: Void

Fills a rectangle.

Parameters

x System.Double requiredposition: 0
y System.Double requiredposition: 1
width System.Double requiredposition: 2
height System.Double requiredposition: 3
color OfficeIMO.Drawing.OfficeColor requiredposition: 4
MeasureText 3 overloads
public Double MeasureText(String text, Double fontSize = 12) #
Returns: Double

Measures text width with the managed font fallback used by this canvas.

Parameters

text System.String requiredposition: 0
fontSize System.Double = 12 optionalposition: 1
public Double MeasureText(String text, Double fontSize, String fontFamily) #
Returns: Double

Measures text width with the requested font family when it can be resolved without platform font APIs.

Parameters

text System.String requiredposition: 0
fontSize System.Double requiredposition: 1
fontFamily System.String requiredposition: 2
public Double MeasureText(String text, Double fontSize, String fontFamily, OfficeFontStyle style) #
Returns: Double

Measures text width with a requested family and bold/italic scoped face when available.

Parameters

text System.String requiredposition: 0
fontSize System.Double requiredposition: 1
fontFamily System.String requiredposition: 2
style OfficeIMO.Drawing.OfficeFontStyle requiredposition: 3
public IDisposable PushClipPolygon(IReadOnlyList<OfficePoint> points) #
Returns: IDisposable

Restricts 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} requiredposition: 0
Polygon points in canvas coordinates.

Returns

A disposable scope that restores the previous clip.

public IDisposable PushClipPolygonsEvenOdd(IReadOnlyList<IReadOnlyList<OfficePoint>> contours) #
Returns: IDisposable

Restricts 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}} requiredposition: 0
Closed contours in canvas coordinates.

Returns

A disposable scope that restores the previous clip.

public IDisposable PushClipPolygonsNonZero(IReadOnlyList<IReadOnlyList<OfficePoint>> contours) #
Returns: IDisposable

Restricts 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}} requiredposition: 0
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) #
Returns: IDisposable

Restricts 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 requiredposition: 0
Left edge of the clipping rectangle.
y System.Double requiredposition: 1
Top edge of the clipping rectangle.
width System.Double requiredposition: 2
Width of the clipping rectangle.
height System.Double requiredposition: 3
Height of the clipping rectangle.

Returns

A disposable scope that restores the previous clip.

Properties

public Int32 Width { get; } #

Canvas width in pixels.

public Int32 Height { get; } #

Canvas height in pixels.