Class Rectangle
Implementation of rectangle shapes.
Implements
Inherited Members
Namespace: Syncfusion.Windows.Forms.Diagram
Assembly: Syncfusion.Diagram.Base.dll
Syntax
public class Rectangle : FilledPath, IUnitIndependent, IDispatchNodeEvents, ISerializable, INode, ICloneable, IServiceReferenceHolder, IServiceReferenceProvider, IPropertyObserver, IPropertyContainer, IServiceProvider, IGraphNode, IDeserializationCallback, IDisposable
Constructors
Rectangle(Rectangle)
Initializes a new instance of the Rectangle class.
Declaration
public Rectangle(Rectangle src)
Parameters
Type | Name | Description |
---|---|---|
Rectangle | src | Object to copy. |
Rectangle(PointF[])
Initializes a new instance of the Rectangle class.
Declaration
public Rectangle(PointF[] pts)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.PointF[] | pts | Points to add to rectangle. |
Remarks
The array passed in must contain two points that specify a rectangle. The first point in the array is the upper-left corner of the rectangle and the second point is the lower-right corner of the rectangle.
Rectangle(PointF[], MeasureUnits)
Initializes a new instance of the Rectangle class.
Declaration
public Rectangle(PointF[] pts, MeasureUnits measureUnits)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.PointF[] | pts | Points to add to rectangle. |
MeasureUnits | measureUnits | Specifies points measure units. |
Remarks
The array passed in must contain two points that specify a rectangle. The first point in the array is the upper-left corner of the rectangle and the second point is the lower-right corner of the rectangle.
Rectangle(RectangleF)
Initializes a new instance of the Rectangle class.
Declaration
public Rectangle(RectangleF rcBounds)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.RectangleF | rcBounds | Rectangle containing position and size. |
Rectangle(RectangleF, MeasureUnits)
Initializes a new instance of the Rectangle class.
Declaration
public Rectangle(RectangleF rcBounds, MeasureUnits measureUnits)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.RectangleF | rcBounds | Rectangle containing position and size. |
MeasureUnits | measureUnits | Specifies rcBounds measure units. |
Rectangle(SerializationInfo, StreamingContext)
Initializes a new instance of the Rectangle class.
Declaration
protected Rectangle(SerializationInfo info, StreamingContext context)
Parameters
Type | Name | Description |
---|---|---|
System.Runtime.Serialization.SerializationInfo | info | Serialization state information. |
System.Runtime.Serialization.StreamingContext | context | Streaming context information. |
Rectangle(Single, Single, Single, Single)
Initializes a new instance of the Rectangle class.
Declaration
public Rectangle(float x, float y, float width, float height)
Parameters
Type | Name | Description |
---|---|---|
System.Single | x | X-coordinate of rectangle. |
System.Single | y | Y-coordinate of rectangle. |
System.Single | width | Width of rectangle. |
System.Single | height | Height of rectangle. |
Rectangle(Single, Single, Single, Single, MeasureUnits)
Initializes a new instance of the Rectangle class.
Declaration
public Rectangle(float x, float y, float width, float height, MeasureUnits measureUnits)
Parameters
Type | Name | Description |
---|---|---|
System.Single | x | X-coordinate of rectangle. |
System.Single | y | Y-coordinate of rectangle. |
System.Single | width | Width of rectangle. |
System.Single | height | Height of rectangle. |
MeasureUnits | measureUnits | Specifies points measure units. |
Methods
Clone()
Creates a new object that is a copy of the current instance.
Declaration
public override object Clone()
Returns
Type | Description |
---|---|
System.Object | Copy of the object this method is invoked against. |
Overrides
CreateLogicalGraphicsPath(PointF[])
Creates node's path with given array of points.
Declaration
protected override GraphicsPath CreateLogicalGraphicsPath(PointF[] pts)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.PointF[] | pts | Points to create path from. |
Returns
Type | Description |
---|---|
System.Drawing.Drawing2D.GraphicsPath | Created GraphicsPath, otherwise null. |
Overrides
GetObjectData(SerializationInfo, StreamingContext)
Populates a System.Runtime.Serialization.SerializationInfo with the data needed to serialize the target object.
Declaration
protected override void GetObjectData(SerializationInfo info, StreamingContext context)
Parameters
Type | Name | Description |
---|---|---|
System.Runtime.Serialization.SerializationInfo | info | The System.Runtime.Serialization.SerializationInfo to populate with data. |
System.Runtime.Serialization.StreamingContext | context | The destination (see System.Runtime.Serialization.StreamingContext) for this serialization. |
Overrides
Exceptions
Type | Condition |
---|---|
System.Security.SecurityException | The caller does not have the required permission. |