Search Results for

    Show / Hide Table of Contents

    Class BezierSegment

    Path for a Bezier segment.

    Inheritance
    System.Object
    BezierSegment
    Implements
    IronSoftware.Abstractions.IBezierSegment
    IronSoftware.Abstractions.IPathSegment
    Namespace: IronWord.Models
    Assembly: IronWord.dll
    Syntax
    public class BezierSegment : Object

    BezierSegment is one curved piece of a custom shape's outline in a Word document. It records a single Bezier curve in a path, so a developer drawing a freeform shape builds its border from a sequence of these segments. It is the curved counterpart to LineSegment, the straight-edge segment; choose this one wherever the outline bends rather than runs straight.

    Construct it with a control point and two flags: new BezierSegment(PointF coordinate, bool isClose = false, bool separateFromPrevious = true). The Coordinate property holds the PointF that shapes the curve. IsClose marks whether the segment closes the path back to the start, and SeparateFromPrevious controls whether the segment begins a new sub-path rather than continuing from the previous point. Segments are added in order to the shape's path collection, so the sequence is what defines the final outline; set IsClose on the last segment when the shape should be a closed loop.

    The document element tutorial walks the object model these shape paths belong to, and the add image how-to covers placing visual content in a document.

    Constructors

    BezierSegment(PointF, Boolean, Boolean)

    Create a new Bezier segment.

    Declaration
    public BezierSegment(PointF coordinate, bool isClose = false, bool separateFromPrevious = true)
    Parameters
    Type Name Description
    System.Drawing.PointF coordinate

    The (x, y) coordinate of the end of the Bezier segment.

    System.Boolean isClose

    Whether this line segment connects back to the path start or not.

    System.Boolean separateFromPrevious

    Whether this line segment connects back to the path start or not.

    Properties

    Coordinate

    Coordinate of the line segment.

    Declaration
    public PointF Coordinate { get; set; }
    Property Value
    Type Description
    System.Drawing.PointF

    IsClose

    Whether this line segment connects back to the path start or not.

    Declaration
    public bool IsClose { get; set; }
    Property Value
    Type Description
    System.Boolean

    SeparateFromPrevious

    Whether this line segment connects to the previous line segment or not.

    Declaration
    public bool SeparateFromPrevious { get; set; }
    Property Value
    Type Description
    System.Boolean

    Implements

    IronSoftware.Abstractions.IBezierSegment
    IronSoftware.Abstractions.IPathSegment
    ☀
    ☾
    Downloads
    • Download with NuGet
    • Start for Free
    In This Article
    Back to top
    Install with NuGet