Class AbstractShape
Represents a shape in a document story.
Implements
Inherited Members
Namespace: DRIT.Document.Drawing
Assembly: DRIT.Document.dll
Syntax
public class AbstractShape : IDrawingObject
Remarks
A document shape is owned by a paragraph, header, footer, or other story. Its position and anchor are document-layout values and are not worksheet-cell coordinates.
Constructors
AbstractShape()
Initializes a new instance of the AbstractShape class.
Declaration
protected AbstractShape()
Remarks
A document shape is owned by a paragraph, header, footer, or other story. Its position and anchor are document-layout values and are not worksheet-cell coordinates.
Properties
Action
Gets the click and hover action settings for this shape.
Maps to a:cNvPr/a:hlinkClick and a:cNvPr/a:hlinkHover.
Declaration
public ActionSettings Action { get; }
Property Value
| Type | Description |
|---|---|
| ActionSettings |
Remarks
A document shape is owned by a paragraph, header, footer, or other story. Its position and anchor are document-layout values and are not worksheet-cell coordinates.
Adjustments
Gets or sets adjustments.
Declaration
public List<long> Adjustments { get; }
Property Value
| Type | Description |
|---|---|
| List<long> |
Remarks
A document shape is owned by a paragraph, header, footer, or other story. Its position and anchor are document-layout values and are not worksheet-cell coordinates.
AlternateText
Gets or sets alternate text.
Declaration
public string AlternateText { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Remarks
A document shape is owned by a paragraph, header, footer, or other story. Its position and anchor are document-layout values and are not worksheet-cell coordinates.
AnchorPosition
Gets the shape's position relative to its anchor.
Declaration
public Position AnchorPosition { get; }
Property Value
| Type | Description |
|---|---|
| Position |
Remarks
It is different if the shape is anchored to a cell.
Effects
Gets or sets effects.
Declaration
public Effects Effects { get; }
Property Value
| Type | Description |
|---|---|
| Effects |
Remarks
A document shape is owned by a paragraph, header, footer, or other story. Its position and anchor are document-layout values and are not worksheet-cell coordinates.
Fill
Gets or sets fill.
Declaration
public Fill Fill { get; }
Property Value
| Type | Description |
|---|---|
| Fill |
Remarks
A document shape is owned by a paragraph, header, footer, or other story. Its position and anchor are document-layout values and are not worksheet-cell coordinates.
FlipH
Gets or sets flip h.
Declaration
public bool FlipH { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Remarks
A document shape is owned by a paragraph, header, footer, or other story. Its position and anchor are document-layout values and are not worksheet-cell coordinates.
FlipV
Gets or sets flip v.
Declaration
public bool FlipV { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Remarks
A document shape is owned by a paragraph, header, footer, or other story. Its position and anchor are document-layout values and are not worksheet-cell coordinates.
Glow
Gets the glow formatting for this shape.
Declaration
public GlowFormat Glow { get; }
Property Value
| Type | Description |
|---|---|
| GlowFormat |
Remarks
A document shape is owned by a paragraph, header, footer, or other story. Its position and anchor are document-layout values and are not worksheet-cell coordinates.
GlowFormat
Gets the glow formatting for this shape.
Declaration
public GlowFormat GlowFormat { get; }
Property Value
| Type | Description |
|---|---|
| GlowFormat |
Remarks
A document shape is owned by a paragraph, header, footer, or other story. Its position and anchor are document-layout values and are not worksheet-cell coordinates.
Hidden
Gets or sets hidden.
Declaration
public bool Hidden { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Remarks
A document shape is owned by a paragraph, header, footer, or other story. Its position and anchor are document-layout values and are not worksheet-cell coordinates.
HyperLink
Gets or sets hyper link.
Declaration
public Hyperlink HyperLink { get; set; }
Property Value
| Type | Description |
|---|---|
| Hyperlink |
Remarks
A document shape is owned by a paragraph, header, footer, or other story. Its position and anchor are document-layout values and are not worksheet-cell coordinates.
Id
Gets or sets id.
Declaration
public int Id { get; }
Property Value
| Type | Description |
|---|---|
| int |
Remarks
A document shape is owned by a paragraph, header, footer, or other story. Its position and anchor are document-layout values and are not worksheet-cell coordinates.
Line
Gets or sets line.
Declaration
public Line Line { get; }
Property Value
| Type | Description |
|---|---|
| Line |
Remarks
A document shape is owned by a paragraph, header, footer, or other story. Its position and anchor are document-layout values and are not worksheet-cell coordinates.
LockText
Gets or sets lock text.
Declaration
public bool LockText { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Remarks
A document shape is owned by a paragraph, header, footer, or other story. Its position and anchor are document-layout values and are not worksheet-cell coordinates.
Locked
Gets or sets locked.
Declaration
public bool Locked { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Remarks
A document shape is owned by a paragraph, header, footer, or other story. Its position and anchor are document-layout values and are not worksheet-cell coordinates.
Locks
Gets the granular locking flags for this shape, or null
when no granular locks have been set. Maps to a:spLocks.
Use EnableLocks() to create the lock object on first access.
Declaration
public ShapeLocks Locks { get; }
Property Value
| Type | Description |
|---|---|
| ShapeLocks |
Remarks
A document shape is owned by a paragraph, header, footer, or other story. Its position and anchor are document-layout values and are not worksheet-cell coordinates.
Name
Gets or sets name.
Declaration
public string Name { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Remarks
A document shape is owned by a paragraph, header, footer, or other story. Its position and anchor are document-layout values and are not worksheet-cell coordinates.
OleObject
Gets the OLE object associated with this shape, if any.
Declaration
public OleObject OleObject { get; }
Property Value
| Type | Description |
|---|---|
| OleObject |
Remarks
A document shape is owned by a paragraph, header, footer, or other story. Its position and anchor are document-layout values and are not worksheet-cell coordinates.
ParentGroup
Gets or sets parent group.
Declaration
public GroupShape ParentGroup { get; }
Property Value
| Type | Description |
|---|---|
| GroupShape |
Remarks
A document shape is owned by a paragraph, header, footer, or other story. Its position and anchor are document-layout values and are not worksheet-cell coordinates.
PolygonPoints
Gets or sets polygon points.
Declaration
public List<PointDoubleUnit> PolygonPoints { get; }
Property Value
| Type | Description |
|---|---|
| List<PointDoubleUnit> |
Remarks
A document shape is owned by a paragraph, header, footer, or other story. Its position and anchor are document-layout values and are not worksheet-cell coordinates.
Position
Gets or sets position.
Declaration
public Position Position { get; }
Property Value
| Type | Description |
|---|---|
| Position |
Remarks
A document shape is owned by a paragraph, header, footer, or other story. Its position and anchor are document-layout values and are not worksheet-cell coordinates.
PrintObject
Gets or sets print object.
Declaration
public bool PrintObject { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Remarks
A document shape is owned by a paragraph, header, footer, or other story. Its position and anchor are document-layout values and are not worksheet-cell coordinates.
Reflection
Gets the reflection formatting for this shape.
Declaration
public ReflectionFormat Reflection { get; }
Property Value
| Type | Description |
|---|---|
| ReflectionFormat |
Remarks
A document shape is owned by a paragraph, header, footer, or other story. Its position and anchor are document-layout values and are not worksheet-cell coordinates.
ReflectionFormat
Gets the reflection formatting for this shape.
Declaration
public ReflectionFormat ReflectionFormat { get; }
Property Value
| Type | Description |
|---|---|
| ReflectionFormat |
Remarks
A document shape is owned by a paragraph, header, footer, or other story. Its position and anchor are document-layout values and are not worksheet-cell coordinates.
RelativePosition
Gets or sets relative position.
Declaration
public RelativePosition RelativePosition { get; set; }
Property Value
| Type | Description |
|---|---|
| RelativePosition |
Remarks
A document shape is owned by a paragraph, header, footer, or other story. Its position and anchor are document-layout values and are not worksheet-cell coordinates.
RotationAngle
Gets or sets rotation angle.
Declaration
public double RotationAngle { get; set; }
Property Value
| Type | Description |
|---|---|
| double |
Remarks
A document shape is owned by a paragraph, header, footer, or other story. Its position and anchor are document-layout values and are not worksheet-cell coordinates.
ShadowFormat
Gets the shadow formatting for this shape.
Declaration
public ShadowFormat ShadowFormat { get; }
Property Value
| Type | Description |
|---|---|
| ShadowFormat |
Remarks
A document shape is owned by a paragraph, header, footer, or other story. Its position and anchor are document-layout values and are not worksheet-cell coordinates.
ShapeType
Gets or sets shape type.
Declaration
public ShapeType ShapeType { get; set; }
Property Value
| Type | Description |
|---|---|
| ShapeType |
Remarks
A document shape is owned by a paragraph, header, footer, or other story. Its position and anchor are document-layout values and are not worksheet-cell coordinates.
Size
Gets or sets size.
Declaration
public Size Size { get; }
Property Value
| Type | Description |
|---|---|
| Size |
Remarks
A document shape is owned by a paragraph, header, footer, or other story. Its position and anchor are document-layout values and are not worksheet-cell coordinates.
SoftEdge
Gets the soft-edge formatting for this shape.
Declaration
public SoftEdgeFormat SoftEdge { get; }
Property Value
| Type | Description |
|---|---|
| SoftEdgeFormat |
Remarks
A document shape is owned by a paragraph, header, footer, or other story. Its position and anchor are document-layout values and are not worksheet-cell coordinates.
SoftEdgeFormat
Gets the soft-edge formatting for this shape.
Declaration
public SoftEdgeFormat SoftEdgeFormat { get; }
Property Value
| Type | Description |
|---|---|
| SoftEdgeFormat |
Remarks
A document shape is owned by a paragraph, header, footer, or other story. Its position and anchor are document-layout values and are not worksheet-cell coordinates.
Tags
Gets the key-value tag collection for custom data storage on this shape.
Declaration
public TagCollection Tags { get; }
Property Value
| Type | Description |
|---|---|
| TagCollection |
Remarks
A document shape is owned by a paragraph, header, footer, or other story. Its position and anchor are document-layout values and are not worksheet-cell coordinates.
ZOrderPosition
Gets zorder position.
Declaration
public int ZOrderPosition { get; }
Property Value
| Type | Description |
|---|---|
| int |
Remarks
A document shape is owned by a paragraph, header, footer, or other story. Its position and anchor are document-layout values and are not worksheet-cell coordinates.
Methods
EnableLocks()
Gets the locking flags for this shape, creating the ShapeLocks object on first access.
Declaration
public ShapeLocks EnableLocks()
Returns
| Type | Description |
|---|---|
| ShapeLocks |
Remarks
A document shape is owned by a paragraph, header, footer, or other story. Its position and anchor are document-layout values and are not worksheet-cell coordinates.
GetGeometryPaths()
Gets the custom geometry paths assigned to this shape.
Declaration
public virtual IReadOnlyList<GeometryPath> GetGeometryPaths()
Returns
| Type | Description |
|---|---|
| IReadOnlyList<GeometryPath> |
Remarks
A document shape is owned by a paragraph, header, footer, or other story. Its position and anchor are document-layout values and are not worksheet-cell coordinates.
SetImage(string)
Describes the abstract Shape configuration.
Declaration
public virtual AbstractShape SetImage(string path)
Parameters
| Type | Name | Description |
|---|---|---|
| string | path | The path used by the operation. |
Returns
| Type | Description |
|---|---|
| AbstractShape | The resulting value. |
Remarks
A document shape is owned by a paragraph, header, footer, or other story. Its position and anchor are document-layout values and are not worksheet-cell coordinates.
SetImage(string, string)
Sets the image source and an optional raster fallback used by applications that cannot render SVG images.
Declaration
public AbstractShape SetImage(string path, string rasterFallbackPath)
Parameters
| Type | Name | Description |
|---|---|---|
| string | path | The primary image path. |
| string | rasterFallbackPath | The raster fallback path, or |
Returns
| Type | Description |
|---|---|
| AbstractShape | This shape. |
Remarks
A document shape is owned by a paragraph, header, footer, or other story. Its position and anchor are document-layout values and are not worksheet-cell coordinates.
SetImageBytes(byte[], string)
Sets raw image bytes on this shape's picture fill.
Declaration
public AbstractShape SetImageBytes(byte[] bytes, string extension = ".png")
Parameters
| Type | Name | Description |
|---|---|---|
| byte[] | bytes | The image bytes. |
| string | extension | The image extension, including the leading dot. |
Returns
| Type | Description |
|---|---|
| AbstractShape | This shape. |
Remarks
A document shape is owned by a paragraph, header, footer, or other story. Its position and anchor are document-layout values and are not worksheet-cell coordinates.
WithAdjustments(params long[])
Provides the with Adjustments behavior for this object.
Declaration
public AbstractShape WithAdjustments(params long[] adjustments)
Parameters
| Type | Name | Description |
|---|---|---|
| long[] | adjustments | The adjustments used by the operation. |
Returns
| Type | Description |
|---|---|
| AbstractShape | The resulting value. |
Remarks
A document shape is owned by a paragraph, header, footer, or other story. Its position and anchor are document-layout values and are not worksheet-cell coordinates.