Represents the geometry for a shape or connector.
Assembly: Microsoft.VisualStudio.Modeling.Sdk.Diagrams.12.0 (in Microsoft.VisualStudio.Modeling.Sdk.Diagrams.12.0.dll)
Thetype exposes the following members.
|CreateDiagramItem||Creates a shape geometry host.|
|Dispose()||Releases all resources used by the current instance of the class.|
|DoFoldToShape||Calculates the point where a connector crosses the outline of the shape geometry. It is used to compute where connectors should terminate.|
|DoHitTest(IGeometryHost, PointD, DiagramHitTestInfo)||Determines whether a point is inside a shape.|
|DoHitTest(IGeometryHost, PointD, DiagramHitTestInfo, Boolean)||Determines whether a point is inside a shape.|
|DoHitTestSelection||Determines whether a point is inside the selection highlight of a shape.|
|DoPaint||Draws the shape geometry, and its shadow if it has one.|
|DoPaintEmphasis||Draws emphasis on the shape.|
|DoPaintGeometry||Paints the boundary and background of the shape.|
|DoPaintResizeFeedback||Draws the resize feedback for the shape geometry. Called repeatedly as the user moves the mouse to resize the shape.|
|DoPaintSelection||Draws the selection highlighting, which typically surrounds the shape boundary.|
|DoPaintShadow||Draws the shadow for the shape.|
|Equals||Determines whether the specified object is equal to the current object. (Inherited from Object.)|
|Finalize||Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)|
|GetBackgroundBrushId||Gets the ID that is assigned to the brush that paints the background of the shape geometry.|
|GetExtraPenWidth||Gets the width of the outline pen that is outside the boundary of the shape.|
|GetHashCode||Serves as the default hash function. (Inherited from Object.)|
|GetHitTestTolerance||Gets the tolerance around the shape geometry to use when a hit test is performed.|
|GetOutlinePenId||Gets the ID that is assigned to the brush that paints the outline of the shape geometry.|
|GetPath(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.|
|GetPath(RectangleD)||Gets the path around the shape geometry.|
|GetPathCopy||Gets a copy of the path around the shape geometry. Dispose the path when you have finished with it.|
|GetPerimeter||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.|
|GetPerimeterBoundingBox||Gets the bounding box around the perimeter of the shape, including the thickness of the pen that draws the boundary.|
|GetSelectionBorderThickness(Graphics)||Gets the width of the border for a selection in the current view.|
|GetSelectionBorderThickness(DiagramClientView)||Gets the width of the border for a selection in the specified view.|
|GetSelectionLineOffset||Gets the distance between the selection and the outside of the shape geometry.|
|GetSelectionLineWidth||Gets the width of the line that indicates that a shape is selected.|
|GetType||Gets the Type of the current instance. (Inherited from Object.)|
|HasFilledBackground||True if this type of geometry has a filled background.|
|HasOutline||True if this type of geometry has a visible border.|
|HasShadow||True if this type of geometry has a shadow.|
|MemberwiseClone||Creates a shallow copy of the current Object. (Inherited from Object.)|
|Rotate||Rotate an array of points around a specified center.|
|SnapToCircle||Snaps a potential point from the bounding box around the shape geometry to the perimeter of the circle.|
|ToString||Returns a string that represents the current object. (Inherited from Object.)|
|Translate||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 . 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.