Class RoundRect
Implementation of rounded rectangle shape.
Implements
Inherited Members
Namespace: Syncfusion.Windows.Forms.Diagram
Assembly: Syncfusion.Diagram.Base.dll
Syntax
public class RoundRect : FilledPath, IUnitIndependent, IDispatchNodeEvents, ISerializable, INode, ICloneable, IServiceReferenceHolder, IServiceReferenceProvider, IPropertyObserver, IPropertyContainer, IServiceProvider, IGraphNode, IDeserializationCallback, IDisposable
Constructors
RoundRect(RoundRect)
Initializes a new instance of the RoundRect class.
Declaration
public RoundRect(RoundRect src)
Parameters
Type | Name | Description |
---|---|---|
RoundRect | src | Object to copy. |
RoundRect(PointF[])
Initializes a new instance of the RoundRect class.
Declaration
public RoundRect(PointF[] pts)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.PointF[] | pts | Points specifying 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.
RoundRect(PointF[], MeasureUnits)
Initializes a new instance of the RoundRect class.
Declaration
public RoundRect(PointF[] pts, MeasureUnits measureUnits)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.PointF[] | pts | Points specifying 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.
RoundRect(PointF[], Single, MeasureUnits)
Initializes a new instance of the RoundRect class.
Declaration
public RoundRect(PointF[] pts, float fCurveRadius, MeasureUnits measureUnits)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.PointF[] | pts | Points specifying rectangle. |
System.Single | fCurveRadius | The curve radius. |
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.
RoundRect(RectangleF)
Initializes a new instance of the RoundRect class.
Declaration
public RoundRect(RectangleF rcBounds)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.RectangleF | rcBounds | The rc bounds. |
RoundRect(RectangleF, MeasureUnits)
Initializes a new instance of the RoundRect class.
Declaration
public RoundRect(RectangleF rcBounds, MeasureUnits measureUnits)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.RectangleF | rcBounds | Rectangle containing position and size. |
MeasureUnits | measureUnits | Specifies rcBounds measure units. |
RoundRect(RectangleF, Single)
Initializes a new instance of the RoundRect class.
Declaration
public RoundRect(RectangleF rcBounds, float fCurveRadius)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.RectangleF | rcBounds | Rectangle containing position and size. |
System.Single | fCurveRadius | The curve radius. |
RoundRect(RectangleF, Single, MeasureUnits)
Initializes a new instance of the RoundRect class.
Declaration
public RoundRect(RectangleF rcBounds, float fCurveRadius, MeasureUnits measureUnits)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.RectangleF | rcBounds | Rectangle containing position and size. |
System.Single | fCurveRadius | The curve radius. |
MeasureUnits | measureUnits | Specifies rcBounds measure units. |
RoundRect(SerializationInfo, StreamingContext)
Initializes a new instance of the RoundRect class.
Declaration
protected RoundRect(SerializationInfo info, StreamingContext context)
Parameters
Type | Name | Description |
---|---|---|
System.Runtime.Serialization.SerializationInfo | info | Serialization state information. |
System.Runtime.Serialization.StreamingContext | context | Streaming context information. |
RoundRect(Single, Single, Single, Single, MeasureUnits)
Initializes a new instance of the RoundRect class.
Declaration
public RoundRect(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. |
RoundRect(Single, Single, Single, Single, Single, MeasureUnits)
Initializes a new instance of the RoundRect class.
Declaration
public RoundRect(float x, float y, float width, float height, float fCurveRadius, 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. |
System.Single | fCurveRadius | The curve radius. |
MeasureUnits | measureUnits | Specifies points measure units. |
Fields
c_fCURVE_RADIUS
Default value of curve radius.
Declaration
protected const float c_fCURVE_RADIUS = 15F
Field Value
Type |
---|
System.Single |
m_fCurveRadius
Curve radius.
Declaration
protected float m_fCurveRadius
Field Value
Type |
---|
System.Single |
Properties
CurveRadius
Gets or sets percentage of the width and height of the rectangle that is included in the curves.
Declaration
public float CurveRadius { get; set; }
Property Value
Type | Description |
---|---|
System.Single | The curve radius. |
CurveRadiusMode
Gets or sets CurverRadiusMode value to update the curveradius of the roundrectangle.
Declaration
public CurveRadiusMode CurveRadiusMode { get; set; }
Property Value
Type | Description |
---|---|
CurveRadiusMode | curve radius updating based the curve radius mode. |
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
DrawShading(Graphics)
Draw the shading over node.
Declaration
protected override void DrawShading(Graphics gfx)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Graphics | gfx | The Graphics to draw on. |
Overrides
GetObjectData(SerializationInfo, StreamingContext)
Populates a 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 | SerializationInfo object to populate. |
System.Runtime.Serialization.StreamingContext | context | Destination streaming context. |
Overrides
UpdateGraphicsPath(SizeF, SizeF)
Updates the graphics path and region.
Declaration
protected override void UpdateGraphicsPath(SizeF szOldSize, SizeF szNewSize)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.SizeF | szOldSize | Old size value. |
System.Drawing.SizeF | szNewSize | New size value. |