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
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.
Returned or exposed by 8
- Property OfficeDrawingShape.Shape
- Method OfficeShape.Clone
- Method OfficeShape.Ellipse
- Method OfficeShape.Line
- Method OfficeShape.Path
- Method OfficeShape.Polygon
- Method OfficeShape.Rectangle
- Method OfficeShape.RoundedRectangle
Accepted by parameters 4
- Method OfficeDrawing.AddShape
- Method OfficeDrawing.AddShapeBehindContent
- Constructor OfficeDrawingShape.OfficeDrawingShape
- 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 OfficeShape.StrokeDashStyle in control.
Parameters
- pattern System.Collections.Generic.IEnumerable<System.Double>?
- offset System.Double = 0
Inherited Methods
public virtual Boolean Equals(Object? obj) #BooleanParameters
- obj Object?
Properties
public OfficeColor? StrokeColor { get; set; } #Optional stroke color. Null means no outline.
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.