Igis Documentation Beta

Class Path

public class Path : CanvasObject 
%117 Path Path CanvasObject CanvasObject Path->CanvasObject

Superclass

CanvasObject

Initializers

init(fill​Mode:​)

public init(fillMode:FillMode = .stroke) 

Creates a new, empty Path

init(source:​)

public init(source:Path) 

Creates a new copy of the specified path

init(points:​fill​Mode:​)

public convenience init(points:[Point], fillMode:FillMode = .stroke) 

Creates a Path by moving to the first point in the array, then drawing lines to each subsequent point, and then closing the path

init(rect:​radius:​fill​Mode:​)

public convenience init(rect:Rect, radius:Int = 0, fillMode:FillMode = .stroke) 

Creates a Path for a rounded rectangle and then closes the path

Parameters

rect Rect

The Rect for which to generate the Path

radius Int

The radius for each corner; 0 indicates no rounding

fill​Mode Fill​Mode

The fillMode to use when rendering the Path

Properties

fill​Mode

public var fillMode : FillMode

Methods

move​To(_:​)

public func moveTo(_ point:Point) 

line​To(_:​)

public func lineTo(_ point:Point) 

lines​To(_:​)

public func linesTo(_ points:[Point]) 

rect(_:​)

public func rect(_ rect:Rect) 

arc(center:​radius:​start​Angle:​end​Angle:​anti​Clockwise:​)

public func arc(center:Point, radius:Int, startAngle:Double=0.0, endAngle:Double=2.0*Double.pi,
                    antiClockwise:Bool = false) 

arc​To(control​Point1:​control​Point2:​radius:​)

public func arcTo(controlPoint1:Point, controlPoint2:Point, radius:Int) 

quadratic​Curve​To(control​Point:​end​Point:​)

public func quadraticCurveTo(controlPoint:Point, endPoint:Point) 

bezier​Curve​To(control​Point1:​control​Point2:​end​Point:​)

public func bezierCurveTo(controlPoint1:Point, controlPoint2:Point, endPoint:Point) 

close()

public func close()