API Reference
OfficeShape
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.
Returned or exposed by
- Property OfficeDrawingShape.Shape
- Method OfficeShape.Clone
- Method OfficeShape.Ellipse
- Method OfficeShape.Line
- Method OfficeShape.Line
- Method OfficeShape.Path
- Method OfficeShape.Path
- Method OfficeShape.Path
- Method OfficeShape.Path
- Method OfficeShape.Polygon
- Method OfficeShape.Polygon
- Method OfficeShape.Rectangle
- Method OfficeShape.RoundedRectangle
Accepted by parameters
- Method OfficeDrawing.AddShape
- Method OfficeDrawing.AddShapeBehindContent
- Constructor OfficeDrawingShape.OfficeDrawingShape
- Method OfficeShapePresets.TryCreate
- Method OfficeShapePresets.TryCreate
Constructors
public OfficeShape() #Methods
public static OfficeShape Ellipse(Double width, Double height) #OfficeShapeCreates an ellipse descriptor bounded by the supplied width and height.
Parameters
- width System.Double
- height System.Double
public static OfficeShape Line(Double x1, Double y1, Double x2, Double y2) #OfficeShapeCreates a straight line descriptor from two points in a local top-left coordinate space.
Parameters
- x1 System.Double
- y1 System.Double
- x2 System.Double
- y2 System.Double
public static OfficeShape Line(OfficePoint start, OfficePoint end) #OfficeShapeCreates a straight line descriptor from two points in a local top-left coordinate space.
Parameters
- start OfficeIMO.Drawing.OfficePoint
- end OfficeIMO.Drawing.OfficePoint
public static OfficeShape Path(params OfficePathCommand[] commands) #OfficeShapeCreates a freeform path descriptor from commands in a local top-left coordinate space.
Parameters
- commands OfficeIMO.Drawing.OfficePathCommand[]
public static OfficeShape Path(IEnumerable<OfficePathCommand> commands) #OfficeShapeCreates a freeform path descriptor from commands in a local top-left coordinate space.
Parameters
- commands System.Collections.Generic.IEnumerable{OfficeIMO.Drawing.OfficePathCommand}
public static OfficeShape Path(Double width, Double height, params OfficePathCommand[] commands) #OfficeShapeCreates a freeform path descriptor while preserving a declared local coordinate canvas.
Parameters
- width System.Double
- height System.Double
- commands OfficeIMO.Drawing.OfficePathCommand[]
public static OfficeShape Path(Double width, Double height, IEnumerable<OfficePathCommand> commands) #OfficeShapeCreates a freeform path descriptor while preserving a declared local coordinate canvas.
Parameters
- width System.Double
- height System.Double
- commands System.Collections.Generic.IEnumerable{OfficeIMO.Drawing.OfficePathCommand}
public static OfficeShape Polygon(params OfficePoint[] points) #OfficeShapeCreates a polygon descriptor from points in a local top-left coordinate space.
Parameters
- points OfficeIMO.Drawing.OfficePoint[]
public static OfficeShape Polygon(IEnumerable<OfficePoint> points) #OfficeShapeCreates a polygon descriptor from points in a local top-left coordinate space.
Parameters
- points System.Collections.Generic.IEnumerable{OfficeIMO.Drawing.OfficePoint}
public static OfficeShape Rectangle(Double width, Double height) #OfficeShapeCreates a rectangle descriptor.
Parameters
- width System.Double
- height System.Double
public static OfficeShape RoundedRectangle(Double width, Double height, Double cornerRadius) #OfficeShapeCreates a rounded rectangle descriptor.
Parameters
- width System.Double
- height System.Double
- cornerRadius System.Double
public Void SetStrokeDashArray(IEnumerable<Double> pattern, Double offset = 0) #VoidSets 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}
- offset System.Double = 0
Inherited Methods
public override Boolean Equals(Object obj) #BooleanParameters
- obj Object
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.