NShape Reference
LineShapeBase Class

<< Click to Display Table of Contents >>

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

NShape Reference
LineShapeBase Class

Previous pageReturn to chapter overviewNext page

A one dimensional shape.

Syntax

public abstract class LineShapeBase : ShapeBaseILinearShape

Description

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

LinearShapeBase can but need not be used as a base class for custom linear shapes. It provides support for the following areas:

Line caps management

Vertex and control point management

Public Properties

Name

Description

IsDirected

Indicates wether one of the line ends has a line cap.

MaxVertexCount

Returns the maximum number of vertices for this shape.

MinVertexCount

Returns the Minimum number of vertices for this shape.

VertexCount

Returns the current number of vertices of this shape.

Public Methods

Name

Description

AddVertex

Adds a new vertex at the indicated position.

CalcNormalVector

Calculates a vector perpendicular to the shape's outline.

CalculateConnectionFoot

Calculates the foot of a connection.

CopyFrom

Copies as many properties as possible from the source shape.

GetControlPointIds

Returns a list of ControlPointIds that fulfill at least one of the requested ControlPointCapabilities.

GetControlPointPosition

Returns the position of the indicated control point.

GetMenuItemDefs

Retrieves the list of context menu item definitions of the shape.

GetNextVertexId

Returns the ControlPointId of the vertex next to the indicated vertex. Direction: ControlPointId.FirstVertex to ControlPointId.LastVertex

GetPreviousVertexId

Returns the ControlPointId of the vertex next to the indicated vertex. Direction: ControlPointId.LastVertex to ControlPointId.FirstVertex.

GetPropertyDefinitions

Implementation of the IEntity.GetPropertyDefinitions pseudo member.

HasControlPointCapability

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

InsertVertex

Inserts a new vertex at the indicated position before the indicated vertex.

Invalidate

Invalidates the shape.

MakePreview

Transforms the shape into a preview shape.

NotifyStyleChanged

Notifies the shape that the given style has changed.

RemoveVertex

Removes the indicated vertex.

Protected Properties and Fields

Name

Description

ControlPointCount

Returns the number of control points.

EndCapAngle

Returns the angle in degrees of the line's end point line cap.

EndCapBounds

Returns the Bounds of the line's end point line cap.

EndCapStyleInternal

Returns the ICapStyle of the line's end point line cap.

StartCapAngle

Returns the angle in degrees of the line's start point line cap.

StartCapBounds

Returns the Bounds of the line's start point line cap.

StartCapStyleInternal

Returns the ICapStyle of the line's start point line cap.

pointIds

List of ControlPointIds for mapping a vertex' index to its  ControlPointId.

shapePoints

Array of points used for drawing

vertices

List of vertices (absolute coordinates)

Protected Methods

Name

Description

CalcCapAngle

Calculates the angle of the a cap in degrees.

CalculateBoundingRectangle

Calculates the axis aligned bounding rectangle of the shape and its children.

Constructor

Constructs a new shape instance.

ContainsPointCore

Base implementation of ContainsPoint testing wether one the line caps contains the given point.

DrawEndCapBackground

Fills the background of the line cap.

DrawStartCapBackground

Fills the background of the line cap.

EndCapContainsPoint

Tests wether the line cap contains the given point.

EndCapIntersectsWith

Tests wether the line cap intersects with the given rectangle.

GetControlPointId

Returns the ControlPointId for the indicated vertex.

GetControlPointIndex

Returns the index of the indicated vertex.

GluePointNeighbourMoved

Notifies the shape that a point next to a glue point has moved. If the glue point is connected to a shape's Reference point, the position of the glue point has to be adjusted.

InitializeToDefault

Initializes this shape with default values.

InvalidateDrawCache

Clears all objects and buffers needed for drawing the shape so that they will be recalculated the next time.

IsConnectionPointEnabled

Checks if the given ControlPoint is a mapped ConnectionPoint (if this shape has a model object).

IsFirstVertex

Tests wether the indicated control point is the first vertex.

IsLastVertex

Tests wether the indicated control point is the last vertex.

LoadFieldsCore

Implementation of IEntity.LoadFields.

LoadInnerObjectsCore

Implementation of IEntity.LoadInnerObjects.

MoveByCore

Implementation of Shape.MoveBy.

ProcessExecModelPropertyChange

Implementation of reacting to model property changes

RecalcDrawCache

Recalculates all objects and buffers needed to draw this shape.

RotateCore

Implementation of Shape.Rotate.

SaveFieldsCore

Implementation of IEntity.SaveFields.

SaveInnerObjectsCore

Implementation of IEntity.SaveInnerObjects.

StartCapContainsPoint

Tests wether the line cap contains the given point.

StartCapIntersectsWith

Tests wether the line cap intersects with the given rectangle.

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:

PolylineBase

CircularArcBase

Requirements

Namespace: Dataweb.NShape.Advanced

Assembly: Dataweb.NShape