LineSegment

open class LineSegment : ShapeSegment

Represents a line segment. This class inherits from ShapeSegment.

  • Initializes a new instance of the LineSegment class.

    Declaration

    Swift

    public override init()

    Return Value

    The newly created LineSegment object.

  • Draws this LineSegment at the specified canvas.

    Declaration

    Swift

    open override func draw(_ canvas: Canvas)

    Parameters

    canvas

    The canvas onto which the LineSegment is drawn.

  • Adds this LineSegment to the specified path.

    Declaration

    Swift

    open override func addToPath(_ path: GraphicsPath)

    Parameters

    path

    The graphics path to which the LineSegment is added.

  • Loads this LineSegment from the specified XML element.

    Declaration

    Swift

    open override func loadFromXml(_ element: XmlElement?)

    Parameters

    element

    The XmlElement, which contains this line segment.

  • The start point of this LineSegment.

    Declaration

    Swift

    open var startPoint: Point
  • The end point of this LineSegment.

    Declaration

    Swift

    open var endPoint: Point