NShape Reference
PathBasedPlanarShape Class

<< Click to Display Table of Contents >>

Navigation:  Class Reference > Namespace Dataweb.NShape.Advanced >

NShape Reference
PathBasedPlanarShape Class

Previous pageReturn to chapter overviewNext page

Base class for most of the shapes in the standard libraries and custom libraries.

Syntax

public abstract class PathBasedPlanarShape: ShapeBaseIPlanarShape;

Description

PathBasedPlanarShape can but need not be used as a base class for shapes using a GDI+ GraphicsPath for drawing.

It provides support for the following areas:

(Re-)Calculating, transforming and drawing the shape's GraphicsPath

IPlanarShape implementation (Angle and FillStyle)

Public Properties

Name

Description

Angle

Specifies the rotation angle of the shape in tenths of degrees.

FillStyle

Specifies the shape's FillStyle.

X

X coordinate of the shape.

Y

Y coordinate of the shape.

Public Methods

Name

Description

CalculateConnectionFoot

A simple base implementation of calculating the foot of a point-to-shape connection based on the bounding rectangle.

CopyFrom

Copies as many properties as possible from the source shape.

DrawOutline

Implementation of drawing the shape's outline.

GetControlPointPosition

Retrieves the position of the given control point.

GetPropertyDefinitions

Implementation of the IEntity.GetPropertyDefinitions pseudo member.

HasControlPointCapability

Tests, whether a control point has at least one of a set of given capabilities.

Invalidate

Invalidates the shape.

MakePreview

Transforms the shape into a preview shape.

NotifyStyleChanged

Notifies the shape that the given style has changed.

Rotate

Rotates the shape.

Protected Properties and Fields

Name

Description

boundingRectangleUnrotated

Stores the axis aligned bounding rectangle of the unrotated shape.

Center

Stores the shape's X- and Y-coordinates. This is typicalls the balance point of the shape and the rotation center.

ControlPoints

An array of points representing the positions of the shape's ControlPoints.

Path

The GraphicsPath used for drawing the shape and its outline.

Owner

The shape collection owning this shape.

Protected Methods

Name

Description

CalcControlPoints

Calculates the positions of the transformed ControlPoints.

CalculateBoundingRectangle

Calculates the axis aligned bounding rectangle of the shape.

CalculatePath

Calculate the shape's GraphicsPath thus defining the shape's shape.

Constructors

Constructs a new shape.

ContainsPointCore

Base implementation of ContainsPoint using the transformed GraphicsPath.

DrawPath

Draws the shape's GraphicsPath.

InitializeToDefault

Initializes the shape with default values.

InvalidateDrawCache

Clears all objects and buffers used for drawing the shape.

LoadFieldsCore

Implementation of IEntity.LoadFields.

LoadInnerObjectsCore

Implementation of IEntity.LoadInnerObjects.

MoveByCore

Implementation of Shape.MoveBy.

MovePointByCore

Implementation of Shape.MoveControlPointBy

ProcessExecModelPropertyChange

Implementation of reacting to model property changes

RecalcDrawCache

Recalculates all objects and buffers needed to draw this shape.

Resizes (creates if it does not exist) the underlying control point array for ControlPoints property.

RotateCore

Implementation of Shape.Rotate.

SaveFieldsCore

Implementation of IEntity.SaveFields.

SaveInnerObjectsCore

Implementation of IEntity.SaveInnerObjects.

TransformDrawCache

Transforms all objects and buffers to the current position and angle.

UpdateDrawCache

Checks if any objects and buffers needed to draw the shape are invalid and calls RecalcDrawCache in this case.

Derived Classes

Derived classes are:

CaptionedShapeBase

Requirements

Namespace: Dataweb.NShape.Advanced

Assembly: Dataweb.NShape