ShapeGeometry Class

 

Represents the geometry for a shape or connector.

Namespace:   Microsoft.VisualStudio.Modeling.Diagrams
Assembly:  Microsoft.VisualStudio.Modeling.Sdk.Diagrams.12.0 (in Microsoft.VisualStudio.Modeling.Sdk.Diagrams.12.0.dll)


public abstract class ShapeGeometry : IDisposable

NameDescription
System_CAPS_protmethodShapeGeometry()

Initializes a new instance of the ShapeGeometry class.

NameDescription
System_CAPS_pubpropertySystem_CAPS_staticMaximumShadowOffset

Gets the maximum offset allowed between a shape outline and the outer edge of its shadow.

System_CAPS_pubpropertyShadowOffset

Gets the offset between the shape outline and the outer edge of the shadow.

System_CAPS_protpropertyUninitializedPath

Gets the path around the shape geometry.

NameDescription
System_CAPS_protmethodSystem_CAPS_staticCreateDiagramItem(IGeometryHost)

Creates a shape geometry host.

System_CAPS_pubmethodDispose()

Releases all resources used by the current instance of the ShapeGeometry class.

System_CAPS_protmethodDispose(Boolean)

System_CAPS_pubmethodDoFoldToShape(IGeometryHost, PointD, PointD)

Calculates the point where a connector crosses the outline of the shape geometry. It is used to compute where connectors should terminate.

Fold to shape
System_CAPS_pubmethodDoHitTest(IGeometryHost, PointD, DiagramHitTestInfo)

Determines whether a point is inside a shape.

System_CAPS_pubmethodDoHitTest(IGeometryHost, PointD, DiagramHitTestInfo, Boolean)

Determines whether a point is inside a shape.

System_CAPS_pubmethodDoHitTestSelection(IGeometryHost, PointD, DiagramHitTestInfo)

Determines whether a point is inside the selection highlight of a shape.

System_CAPS_pubmethodDoPaint(DiagramPaintEventArgs, IGeometryHost)

Draws the shape geometry, and its shadow if it has one.

System_CAPS_pubmethodDoPaintEmphasis(DiagramPaintEventArgs, IGeometryHost)

Draws emphasis on the shape.

System_CAPS_protmethodDoPaintGeometry(DiagramPaintEventArgs, IGeometryHost)

Paints the boundary and background of the shape.

System_CAPS_pubmethodDoPaintResizeFeedback(DiagramPaintEventArgs, IGeometryHost, RectangleD)

Draws the resize feedback for the shape geometry. Called repeatedly as the user moves the mouse to resize the shape.

System_CAPS_pubmethodDoPaintSelection(DiagramPaintEventArgs, IGeometryHost, Boolean, Boolean, Boolean)

Draws the selection highlighting, which typically surrounds the shape boundary.

System_CAPS_protmethodDoPaintShadow(DiagramPaintEventArgs, IGeometryHost)

Draws the shadow for the shape.

System_CAPS_pubmethodEquals(Object)

(Inherited from Object.)

System_CAPS_protmethodFinalize()

(Inherited from Object.)

System_CAPS_pubmethodGetBackgroundBrushId(IGeometryHost)

Gets the ID that is assigned to the brush that paints the background of the shape geometry.

System_CAPS_pubmethodGetExtraPenWidth(IGeometryHost)

Gets the width of the outline pen that is outside the boundary of the shape.

System_CAPS_pubmethodGetHashCode()

(Inherited from Object.)

System_CAPS_protmethodSystem_CAPS_staticGetHitTestTolerance(DiagramHitTestInfo)

Gets the tolerance around the shape geometry to use when a hit test is performed.

System_CAPS_pubmethodGetOutlinePenId(IGeometryHost)

Gets the ID that is assigned to the brush that paints the outline of the shape geometry.

System_CAPS_pubmethodGetPath(IGeometryHost)

Gets the path around the shape geometry. Use the returned path before applying GetPath() to any other shape. Use GetPathCopy() if you want to retain a path.

System_CAPS_protmethodGetPath(RectangleD)

Gets the path around the shape geometry.

System_CAPS_pubmethodGetPathCopy(IGeometryHost)

Gets a copy of the path around the shape geometry. Dispose the path when you have finished with it.

System_CAPS_pubmethodGetPerimeter(IGeometryHost)

Gets the path of the perimeter around the shape, including the width of the pen that draws the boundary. Make a copy of this path if you want to retain it.

System_CAPS_protmethodGetPerimeterBoundingBox(IGeometryHost)

Gets the bounding box around the perimeter of the shape, including the thickness of the pen that draws the boundary.

System_CAPS_pubmethodSystem_CAPS_staticGetSelectionBorderThickness(DiagramClientView)

Gets the width of the border for a selection in the specified view.

System_CAPS_pubmethodSystem_CAPS_staticGetSelectionBorderThickness(Graphics)

Gets the width of the border for a selection in the current view.

System_CAPS_pubmethodGetSelectionLineOffset(DiagramClientView)

Gets the distance between the selection and the outside of the shape geometry.

System_CAPS_pubmethodGetSelectionLineWidth(DiagramClientView)

Gets the width of the line that indicates that a shape is selected.

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_protmethodHasFilledBackground(IGeometryHost)

True if this type of geometry has a filled background.

System_CAPS_protmethodHasOutline(IGeometryHost)

True if this type of geometry has a visible border.

System_CAPS_protmethodHasShadow(IGeometryHost)

True if this type of geometry has a shadow.

System_CAPS_protmethodMemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethodSystem_CAPS_staticRotate(PointD, Double, PointD[])

Rotate an array of points around a specified center.

System_CAPS_pubmethodSystem_CAPS_staticSnapToCircle(PointD, Double, PointD, PointD)

Snaps a potential point from the bounding box around the shape geometry to the perimeter of the circle.

System_CAPS_pubmethodToString()

(Inherited from Object.)

System_CAPS_pubmethodSystem_CAPS_staticTranslate(PointD, PointD[])

Moves an array of points by a specified vector.

This class and its derivatives deal with operations and calculations associated with the outline of the shape. There is a subclass for each of the major kinds of shape, such as ImageShapeGeometry, CompartmentShapeGeometry, and LinkShapeGeometry. By default, your shape or connector class is associated with one of these standard geometry classes.

To override functions of ShapeGeometry:

  • Create your own class derived from one of the standard subclasses of ShapeGeometry. Do not add state variables to this class.

  • In your shape class, override the ShapeGeometry property to return an instance of your ShapeGeometry subclass.

ShapeGeometry is a lightweight class – it has no state, so that you can share an instance between all the instances of a shape class.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: