Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

OfficeShape

OfficeIMO.Drawing

Namespace
OfficeIMO.Drawing
Assembly
OfficeIMO.Core
Source revision
ba882f6b0d07 with working tree changes
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

Explore 12 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Accepted by parameters 4

Constructors

public OfficeShape() #

Methods

public OfficeShape Clone() #

Creates a detached copy of this shape.

public static OfficeShape Ellipse(double width, double height) #

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

Parameters

width double required
height double required
Line 2 overloads
public static OfficeShape Line(double x1, double y1, double x2, double y2) #

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

Parameters

x1 double required
y1 double required
x2 double required
y2 double required
public static OfficeShape Line(OfficePoint start, OfficePoint end) #

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

Parameters

start OfficeIMO.Drawing.OfficePoint required
end OfficeIMO.Drawing.OfficePoint required
Path 4 overloads
public static OfficeShape Path(params OfficePathCommand[] commands) #

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

Parameters

commands OfficeIMO.Drawing.OfficePathCommand[] required
public static OfficeShape Path(IEnumerable<OfficePathCommand> commands) #

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

Parameters

commands System.Collections.Generic.IEnumerable<OfficeIMO.Drawing.OfficePathCommand> required
public static OfficeShape Path(double width, double height, params OfficePathCommand[] commands) #

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

Parameters

width double required
height double required
commands OfficeIMO.Drawing.OfficePathCommand[] required
public static OfficeShape Path(double width, double height, IEnumerable<OfficePathCommand> commands) #

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

Parameters

width double required
height double required
commands System.Collections.Generic.IEnumerable<OfficeIMO.Drawing.OfficePathCommand> required
Polygon 2 overloads
public static OfficeShape Polygon(params OfficePoint[] points) #

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

Parameters

points OfficeIMO.Drawing.OfficePoint[] required
public static OfficeShape Polygon(IEnumerable<OfficePoint> points) #

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

Parameters

points System.Collections.Generic.IEnumerable<OfficeIMO.Drawing.OfficePoint> required
public static OfficeShape Rectangle(double width, double height) #

Creates a rectangle descriptor.

Parameters

width double required
height double required
public static OfficeShape RoundedRectangle(double width, double height, double cornerRadius) #

Creates a rounded rectangle descriptor.

Parameters

width double required
height double required
cornerRadius double required
public void SetStrokeDashArray(IEnumerable<double>? pattern, double offset = 0) #

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

Parameters

pattern System.Collections.Generic.IEnumerable<double>? required
offset double = 0 optional

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 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; private set; } #

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

public double StrokeDashOffset { get; private set; } #

Offset into OfficeShape.StrokeDashArray at which stroking begins.

public double StrokeMiterLimit { get; set; } #

Maximum miter length as a multiple of the stroke width.

public OfficeStrokeLineCap? StrokeLineCap { get; set; } #

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

public 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 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 OfficeShape.FillColor for fill-capable shapes.

public OfficeRadialGradient? FillRadialGradient { get; set; } #

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

public OfficeLinearGradient? StrokeGradient { get; set; } #

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

public OfficeRadialGradient? StrokeRadialGradient { get; set; } #

Optional radial gradient stroke. When set, renderers should prefer it over OfficeShape.StrokeGradient and OfficeShape.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 double? FillOpacity { get; set; } #

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

public double? StrokeOpacity { get; set; } #

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

public 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; private set; } #

Local points for point-based shapes such as polygons.

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

Local commands for freeform path shapes.