Core2D.Shapes.XRectangle.Create C# (CSharp) Method

Create() public static method

Creates a new XRectangle instance.
public static Create ( XPoint topLeft, XPoint bottomRight, ShapeStyle style, BaseShape point, bool isStroked = true, bool isFilled = false, string text = null, string name = "" ) : XRectangle
topLeft XPoint The corner point.
bottomRight XPoint The corner point.
style Core2D.Style.ShapeStyle The shape style.
point Core2D.Shape.BaseShape The point template.
isStroked bool The flag indicating whether shape is stroked.
isFilled bool The flag indicating whether shape is filled.
text string The text string.
name string The shape name.
return XRectangle
        public static XRectangle Create(XPoint topLeft, XPoint bottomRight, ShapeStyle style, BaseShape point, bool isStroked = true, bool isFilled = false, string text = null, string name = "")
        {
            return new XRectangle()
            {
                Name = name,
                Style = style,
                IsStroked = isStroked,
                IsFilled = isFilled,
                TopLeft = topLeft,
                BottomRight = bottomRight,
                Text = text,
                IsGrid = false,
                OffsetX = 30.0,
                OffsetY = 30.0,
                CellWidth = 30.0,
                CellHeight = 30.0
            };
        }
    }

Same methods

XRectangle::Create ( double x, double y, ShapeStyle style, BaseShape point, bool isStroked = true, bool isFilled = false, string text = null, string name = "" ) : XRectangle
XRectangle::Create ( double x1, double y1, double x2, double y2, ShapeStyle style, BaseShape point, bool isStroked = true, bool isFilled = false, string text = null, string name = "" ) : XRectangle
XRectangle