Class AnchoringPrimitive
Base class for node's primitives like ControlPoint, EndPoint, ConnectionPoint etc.
Implements
Inherited Members
Namespace: Syncfusion.Windows.Forms.Diagram
Assembly: Syncfusion.Diagram.Base.dll
Syntax
public abstract class AnchoringPrimitive : PropertyContainer, IServiceReferenceHolder, IServiceReferenceProvider, IPropertyObserver, IPropertyContainer, ICloneable, ISerializable, IDisposable
Constructors
AnchoringPrimitive()
Initializes a new instance of the AnchoringPrimitive class.
Declaration
public AnchoringPrimitive()
AnchoringPrimitive(AnchoringPrimitive)
Initializes a new instance of the AnchoringPrimitive class.
Declaration
public AnchoringPrimitive(AnchoringPrimitive src)
Parameters
Type | Name | Description |
---|---|---|
AnchoringPrimitive | src | The source instance. |
AnchoringPrimitive(Node)
Initializes a new instance of the AnchoringPrimitive class.
Declaration
public AnchoringPrimitive(Node container)
Parameters
Type | Name | Description |
---|---|---|
Node | container | The primitive container node. |
AnchoringPrimitive(Node, Position)
Initializes a new instance of the AnchoringPrimitive class.
Declaration
public AnchoringPrimitive(Node container, Position position)
Parameters
Type | Name | Description |
---|---|---|
Node | container | The primitive container node. |
Position | position | The primitive position relative to its container. |
AnchoringPrimitive(SerializationInfo, StreamingContext)
Initializes a new instance of the AnchoringPrimitive class.
Declaration
public AnchoringPrimitive(SerializationInfo info, StreamingContext context)
Parameters
Type | Name | Description |
---|---|---|
System.Runtime.Serialization.SerializationInfo | info | The serialization info. |
System.Runtime.Serialization.StreamingContext | context | The serialization context. |
Properties
Container
Gets or sets the container node of primitive.
Declaration
public Node Container { get; set; }
Property Value
Type | Description |
---|---|
Node | The container. |
ID
Gets or sets the unique AnchoringPrimitive ID.
Declaration
public int ID { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The unique ID. |
OffsetX
Gets or sets AnchoringPrimitive offset in percents relative to its container's width from container's top left point.
Declaration
public float OffsetX { get; set; }
Property Value
Type |
---|
System.Single |
OffsetY
Gets or sets AnchoringPrimitive offset in percents relative to its container's height from container's top left point.
Declaration
public float OffsetY { get; set; }
Property Value
Type |
---|
System.Single |
Position
Gets or sets the position of primitive in local coordinates.
Declaration
public Position Position { get; set; }
Property Value
Type | Description |
---|---|
Position | The position relative to its container. |
Methods
Dispose()
Declaration
public override void Dispose()
Overrides
Draw(Graphics)
Draws primitive to the specified graphics.
Declaration
public void Draw(Graphics gfx)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Graphics | gfx | Graphics to draw on. |
Remarks
Call the abstract method - Render(Graphics gfx).
GetObjectData(SerializationInfo, StreamingContext)
Gets the object data to serialize instance.
Declaration
protected override void GetObjectData(SerializationInfo info, StreamingContext context)
Parameters
Type | Name | Description |
---|---|---|
System.Runtime.Serialization.SerializationInfo | info | The serialization info. |
System.Runtime.Serialization.StreamingContext | context | The serialization context. |
Overrides
GetPosition()
Gets the primitive object position in local coordinates.
Declaration
public virtual PointF GetPosition()
Returns
Type | Description |
---|---|
System.Drawing.PointF | Position of primitive in local coordinates. |
InvokeUpdateCallback()
Invokes the update refresh rectangle callback. Used for update refresh rectangle for container by calling prospected non-parameter method UpdateRefreshRect().
Declaration
protected void InvokeUpdateCallback()
OnMeasureUnitsChanging(MeasureUnits, MeasureUnits)
Convert to required measurement units
Declaration
protected override void OnMeasureUnitsChanging(MeasureUnits from, MeasureUnits to)
Parameters
Type | Name | Description |
---|---|---|
MeasureUnits | from | |
MeasureUnits | to |
Overrides
PositionChange(Single, Single)
Calling when primitive position is changed.
Declaration
protected virtual void PositionChange(float fOffsetX, float fOffsetY)
Parameters
Type | Name | Description |
---|---|---|
System.Single | fOffsetX | The offset by X axis. |
System.Single | fOffsetY | The offset by Y axis. |
RecordPropertyChanged(String)
Records the property changed.
Declaration
protected override void RecordPropertyChanged(string strPropertyName)
Parameters
Type | Name | Description |
---|---|---|
System.String | strPropertyName | Name of the changed property. |
Overrides
Render(Graphics)
Renders the primitive object to specified graphics.
Declaration
protected abstract void Render(Graphics gfx)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Graphics | gfx | Graphics to draw on. |