public static Create ( double x = 0.0, double y = 0.0, |
||
x | double | The X coordinate of point. |
y | double | The Y coordinate of point. |
shape | The point template. | |
alignment | PointAlignment | The point alignment. |
name | string | The shape name. |
Résultat |
/// <summary> /// Creates a new <see cref="XText"/> instance. /// </summary> /// <param name="x1">The X coordinate of <see cref="XText.TopLeft"/> corner point.</param> /// <param name="y1">The Y coordinate of <see cref="XText.TopLeft"/> corner point.</param> /// <param name="x2">The X coordinate of <see cref="XText.BottomRight"/> corner point.</param> /// <param name="y2">The Y coordinate of <see cref="XText.BottomRight"/> corner point.</param> /// <param name="style">The shape style.</param> /// <param name="point">The point template.</param> /// <param name="text">The text string.</param> /// <param name="isStroked">The flag indicating whether shape is stroked.</param> /// <param name="name">The shape name.</param> /// <returns>The new instance of the <see cref="XText"/> class.</returns> public static XText Create(double x1, double y1, double x2, double y2, ShapeStyle style, BaseShape point, string text, bool isStroked = true, string name = "") { return(new XText() { Name = name, Style = style, IsStroked = isStroked, TopLeft = XPoint.Create(x1, y1, point), BottomRight = XPoint.Create(x2, y2, point), Text = text }); }
/// <summary> /// Creates a new <see cref="XLine"/> instance. /// </summary> /// <param name="x1">The X coordinate of <see cref="XLine.Start"/> point.</param> /// <param name="y1">The Y coordinate of <see cref="XLine.Start"/> point.</param> /// <param name="x2">The X coordinate of <see cref="XLine.End"/> point.</param> /// <param name="y2">The Y coordinate of <see cref="XLine.End"/> point.</param> /// <param name="style">The shape style.</param> /// <param name="point">The point template.</param> /// <param name="isStroked">The flag indicating whether shape is stroked.</param> /// <param name="name">The shape name.</param> /// <returns>The new instance of the <see cref="XLine"/> class.</returns> public static XLine Create(double x1, double y1, double x2, double y2, ShapeStyle style, BaseShape point, bool isStroked = true, string name = "") { return(new XLine() { Name = name, Style = style, IsStroked = isStroked, IsFilled = false, Start = XPoint.Create(x1, y1, point), End = XPoint.Create(x2, y2, point) }); }
/// <summary> /// Creates a new <see cref="XEllipse"/> instance. /// </summary> /// <param name="x1">The X coordinate of <see cref="XText.TopLeft"/> corner point.</param> /// <param name="y1">The Y coordinate of <see cref="XText.TopLeft"/> corner point.</param> /// <param name="x2">The X coordinate of <see cref="XText.BottomRight"/> corner point.</param> /// <param name="y2">The Y coordinate of <see cref="XText.BottomRight"/> corner point.</param> /// <param name="style">The shape style.</param> /// <param name="point">The point template.</param> /// <param name="isStroked">The flag indicating whether shape is stroked.</param> /// <param name="isFilled">The flag indicating whether shape is filled.</param> /// <param name="text">The text string.</param> /// <param name="name">The shape name.</param> /// <returns>The new instance of the <see cref="XEllipse"/> class.</returns> public static XEllipse Create(double x1, double y1, double x2, double y2, ShapeStyle style, BaseShape point, bool isStroked = true, bool isFilled = false, string text = null, string name = "") { return(new XEllipse() { Name = name, Style = style, IsStroked = isStroked, IsFilled = isFilled, TopLeft = XPoint.Create(x1, y1, point), BottomRight = XPoint.Create(x2, y2, point), Text = text, }); }
/// <summary> /// Creates a new <see cref="XQuadraticBezier"/> instance. /// </summary> /// <param name="x1">The X coordinate of <see cref="XQuadraticBezier.Point1"/> point.</param> /// <param name="y1">The Y coordinate of <see cref="XQuadraticBezier.Point1"/> point.</param> /// <param name="x2">The X coordinate of <see cref="XQuadraticBezier.Point2"/> point.</param> /// <param name="y2">The Y coordinate of <see cref="XQuadraticBezier.Point2"/> point.</param> /// <param name="x3">The X coordinate of <see cref="XQuadraticBezier.Point3"/> point.</param> /// <param name="y3">The Y coordinate of <see cref="XQuadraticBezier.Point3"/> point.</param> /// <param name="style">The shape style.</param> /// <param name="point">The point template.</param> /// <param name="isStroked">The flag indicating whether shape is stroked.</param> /// <param name="isFilled">The flag indicating whether shape is filled.</param> /// <param name="name">The shape name.</param> /// <returns>The new instance of the <see cref="XQuadraticBezier"/> class.</returns> public static XQuadraticBezier Create(double x1, double y1, double x2, double y2, double x3, double y3, ShapeStyle style, BaseShape point, bool isStroked = true, bool isFilled = false, string name = "") { return(new XQuadraticBezier() { Name = name, Style = style, IsStroked = isStroked, IsFilled = isFilled, Point1 = XPoint.Create(x1, y1, point), Point2 = XPoint.Create(x2, y2, point), Point3 = XPoint.Create(x3, y3, point) }); }
/// <summary> /// Creates a new <see cref="XRectangle"/> instance. /// </summary> /// <param name="x1">The X coordinate of <see cref="XText.TopLeft"/> corner point.</param> /// <param name="y1">The Y coordinate of <see cref="XText.TopLeft"/> corner point.</param> /// <param name="x2">The X coordinate of <see cref="XText.BottomRight"/> corner point.</param> /// <param name="y2">The Y coordinate of <see cref="XText.BottomRight"/> corner point.</param> /// <param name="style">The shape style.</param> /// <param name="point">The point template.</param> /// <param name="isStroked">The flag indicating whether shape is stroked.</param> /// <param name="isFilled">The flag indicating whether shape is filled.</param> /// <param name="text">The text string.</param> /// <param name="name">The shape name.</param> /// <returns>The new instance of the <see cref="XRectangle"/> class.</returns> public static 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 = "") { return(new XRectangle() { Name = name, Style = style, IsStroked = isStroked, IsFilled = isFilled, TopLeft = XPoint.Create(x1, y1, point), BottomRight = XPoint.Create(x2, y2, point), Text = text, IsGrid = false, OffsetX = 30.0, OffsetY = 30.0, CellWidth = 30.0, CellHeight = 30.0 }); }