Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/

API Reference

Class

OfficeShape

Namespace OfficeIMO.Drawing
Assembly OfficeIMO.Core
Modifiers sealed

Dependency-free vector shape descriptor shared by OfficeIMO document packages. Dimensions are expressed in the caller's layout unit, such as points for PDF.

Inheritance

  • Object
  • OfficeShape

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

Methods

public OfficeShape Clone() #
Returns: OfficeShape

Creates a detached copy of this shape.

public static OfficeShape Ellipse(Double width, Double height) #
Returns: OfficeShape

Creates an ellipse descriptor bounded by the supplied width and height.

Parameters

width System.Double requiredposition: 0
height System.Double requiredposition: 1
Line 2 overloads
public static OfficeShape Line(Double x1, Double y1, Double x2, Double y2) #
Returns: OfficeShape

Creates a straight line descriptor from two points in a local top-left coordinate space.

Parameters

x1 System.Double requiredposition: 0
y1 System.Double requiredposition: 1
x2 System.Double requiredposition: 2
y2 System.Double requiredposition: 3
public static OfficeShape Line(OfficePoint start, OfficePoint end) #
Returns: OfficeShape

Creates a straight line descriptor from two points in a local top-left coordinate space.

Parameters

start OfficeIMO.Drawing.OfficePoint requiredposition: 0
end OfficeIMO.Drawing.OfficePoint requiredposition: 1
Path 4 overloads
public static OfficeShape Path(params OfficePathCommand[] commands) #
Returns: OfficeShape

Creates a freeform path descriptor from commands in a local top-left coordinate space.

Parameters

commands OfficeIMO.Drawing.OfficePathCommand[] requiredposition: 0
public static OfficeShape Path(IEnumerable<OfficePathCommand> commands) #
Returns: OfficeShape

Creates a freeform path descriptor from commands in a local top-left coordinate space.

Parameters

commands System.Collections.Generic.IEnumerable{OfficeIMO.Drawing.OfficePathCommand} requiredposition: 0
public static OfficeShape Path(Double width, Double height, params OfficePathCommand[] commands) #
Returns: OfficeShape

Creates a freeform path descriptor while preserving a declared local coordinate canvas.

Parameters

width System.Double requiredposition: 0
height System.Double requiredposition: 1
commands OfficeIMO.Drawing.OfficePathCommand[] requiredposition: 2
public static OfficeShape Path(Double width, Double height, IEnumerable<OfficePathCommand> commands) #
Returns: OfficeShape

Creates a freeform path descriptor while preserving a declared local coordinate canvas.

Parameters

width System.Double requiredposition: 0
height System.Double requiredposition: 1
commands System.Collections.Generic.IEnumerable{OfficeIMO.Drawing.OfficePathCommand} requiredposition: 2
Polygon 2 overloads
public static OfficeShape Polygon(params OfficePoint[] points) #
Returns: OfficeShape

Creates a polygon descriptor from points in a local top-left coordinate space.

Parameters

points OfficeIMO.Drawing.OfficePoint[] requiredposition: 0
public static OfficeShape Polygon(IEnumerable<OfficePoint> points) #
Returns: OfficeShape

Creates a polygon descriptor from points in a local top-left coordinate space.

Parameters

points System.Collections.Generic.IEnumerable{OfficeIMO.Drawing.OfficePoint} requiredposition: 0
public static OfficeShape Rectangle(Double width, Double height) #
Returns: OfficeShape

Creates a rectangle descriptor.

Parameters

width System.Double requiredposition: 0
height System.Double requiredposition: 1
public static OfficeShape RoundedRectangle(Double width, Double height, Double cornerRadius) #
Returns: OfficeShape

Creates a rounded rectangle descriptor.

Parameters

width System.Double requiredposition: 0
height System.Double requiredposition: 1
cornerRadius System.Double requiredposition: 2
public Void SetStrokeDashArray(IEnumerable<Double> pattern, Double offset = 0) #
Returns: Void

Sets an exact stroke dash array and phase. Passing null or an empty sequence clears the exact pattern and leaves StrokeDashStyle in control.

Parameters

pattern System.Collections.Generic.IEnumerable{System.Double} requiredposition: 0
offset System.Double = 0 optionalposition: 1

Properties

public OfficeShapeKind Kind { get; set; } #

Shape type.

public Double Width { get; set; } #

Shape width in the caller's layout unit.

public Double Height { get; set; } #

Shape height in the caller's layout unit.

public Nullable<OfficeColor> StrokeColor { get; set; } #

Optional stroke color. Null means no outline.

public Double StrokeWidth { get; set; } #

Stroke width in the caller's layout unit.

public OfficeStrokeDashStyle StrokeDashStyle { get; set; } #

Stroke dash style.

public IReadOnlyList<Double> StrokeDashArray { get; set; } #

Optional exact alternating dash and gap lengths. When non-empty, renderers prefer this pattern over StrokeDashStyle.

public Double StrokeDashOffset { get; set; } #

Offset into StrokeDashArray at which stroking begins.

public Double StrokeMiterLimit { get; set; } #

Maximum miter length as a multiple of the stroke width.

public Nullable<OfficeStrokeLineCap> StrokeLineCap { get; set; } #

Optional stroke ending style for open paths. Null lets each renderer choose its default.

public Nullable<OfficeStrokeLineJoin> StrokeLineJoin { get; set; } #

Optional stroke corner style for connected path segments. Null lets each renderer choose its default.

public OfficeLineMarker StrokeStartMarker { get; set; } #

Optional marker drawn at the first point of open line shapes.

public OfficeLineMarker StrokeEndMarker { get; set; } #

Optional marker drawn at the last point of open line shapes.

public Nullable<OfficeColor> FillColor { get; set; } #

Optional fill color. Null means transparent fill.

public OfficeLinearGradient FillGradient { get; set; } #

Optional gradient fill. When set, renderers should prefer it over FillColor for fill-capable shapes.

public OfficeRadialGradient FillRadialGradient { get; set; } #

Optional radial gradient fill. When set, renderers should prefer it over FillGradient and FillColor for fill-capable shapes.

public OfficeLinearGradient StrokeGradient { get; set; } #

Optional linear gradient stroke. When set, renderers should prefer it over StrokeColor for stroked shapes.

public OfficeRadialGradient StrokeRadialGradient { get; set; } #

Optional radial gradient stroke. When set, renderers should prefer it over StrokeGradient and StrokeColor for stroked shapes.

public OfficeShadow Shadow { get; set; } #

Optional shadow intent rendered behind the shape when supported by a format-specific renderer.

public OfficeGlow Glow { get; set; } #

Optional glow intent rendered around the shape when supported by a format-specific renderer.

public Nullable<Double> FillOpacity { get; set; } #

Optional fill opacity from 0.0 (transparent) to 1.0 (opaque). Null lets each renderer use opaque fill.

public Nullable<Double> StrokeOpacity { get; set; } #

Optional stroke opacity from 0.0 (transparent) to 1.0 (opaque). Null lets each renderer use opaque stroke.

public Nullable<OfficeTransform> Transform { get; set; } #

Optional local transform applied before format-specific rendering.

public OfficeClipPath ClipPath { get; set; } #

Optional local clipping path applied before format-specific rendering.

public OfficeFillRule FillRule { get; set; } #

Fill rule used for multi-contour path shapes.

public Double CornerRadius { get; set; } #

Corner radius for rounded rectangle shapes.

public IReadOnlyList<OfficePoint> Points { get; set; } #

Local points for point-based shapes such as polygons.

public IReadOnlyList<OfficePathCommand> PathCommands { get; set; } #

Local commands for freeform path shapes.