OfficeShape
OfficeIMO.Drawing
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) #Creates an ellipse descriptor bounded by the supplied width and height.
Parameters
- width double
- height double
Returns
OfficeShapepublic 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
- y1 double
- x2 double
- y2 double
Returns
OfficeShapepublic 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
- end OfficeIMO.Drawing.OfficePoint
Returns
OfficeShapepublic 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[]
Returns
OfficeShapepublic 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>
Returns
OfficeShapepublic 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
- height double
- commands OfficeIMO.Drawing.OfficePathCommand[]
Returns
OfficeShapepublic 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
- height double
- commands System.Collections.Generic.IEnumerable<OfficeIMO.Drawing.OfficePathCommand>
Returns
OfficeShapepublic static OfficeShape Polygon(params OfficePoint[] points) #Creates a polygon descriptor from points in a local top-left coordinate space.
Parameters
- points OfficeIMO.Drawing.OfficePoint[]
Returns
OfficeShapepublic 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>
Returns
OfficeShapepublic static OfficeShape Rectangle(double width, double height) #Creates a rectangle descriptor.
Parameters
- width double
- height double
Returns
OfficeShapepublic static OfficeShape RoundedRectangle(double width, double height, double cornerRadius) #Creates a rounded rectangle descriptor.
Parameters
- width double
- height double
- cornerRadius double
Returns
OfficeShapepublic 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>?
- offset double = 0
Inherited Methods
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.