SFLineString

Objective-C

@interface SFLineString : SFCurve

Swift

class SFLineString : SFCurve

A Curve that connects two or more points in space.

  • Array of points

    Declaration

    Objective-C

    @property (nonatomic, strong) NSMutableArray<SFPoint *> *points;

    Swift

    var points: NSMutableArray! { get set }
  • Create

    Declaration

    Objective-C

    + (SFLineString *)lineString;

    Return Value

    new line string

  • Create

    Declaration

    Objective-C

    + (SFLineString *)lineStringWithHasZ:(BOOL)hasZ andHasM:(BOOL)hasM;

    Parameters

    hasZ

    has z values

    hasM

    has m values

    Return Value

    new line string

  • Create

    Declaration

    Objective-C

    + (SFLineString *)lineStringWithPoints:(NSMutableArray<SFPoint *> *)points;

    Parameters

    points

    list of points

    Return Value

    new line string

  • Create

    Declaration

    Objective-C

    + (SFLineString *)lineStringWithLineString:(SFLineString *)lineString;

    Parameters

    lineString

    line string

    Return Value

    new line string

  • Initialize

    Declaration

    Objective-C

    - (instancetype)init;

    Swift

    init!()

    Return Value

    new line string

  • Initialize

    Declaration

    Objective-C

    - (instancetype)initWithHasZ:(BOOL)hasZ andHasM:(BOOL)hasM;

    Swift

    init!(hasZ: Bool, andHasM hasM: Bool)

    Parameters

    hasZ

    has z values

    hasM

    has m values

    Return Value

    new line string

  • Initialize

    Declaration

    Objective-C

    - (instancetype)initWithPoints:(NSMutableArray<SFPoint *> *)points;

    Swift

    init!(points: NSMutableArray!)

    Parameters

    points

    list of points

    Return Value

    new line string

  • Initialize

    Declaration

    Objective-C

    - (instancetype)initWithType:(enum SFGeometryType)geometryType
                         andHasZ:(BOOL)hasZ
                         andHasM:(BOOL)hasM;

    Swift

    init!(type geometryType: SFGeometryType, andHasZ hasZ: Bool, andHasM hasM: Bool)

    Parameters

    geometryType

    geometry type

    hasZ

    has z values

    hasM

    has m values

    Return Value

    new line string

  • Initialize

    Declaration

    Objective-C

    - (instancetype)initWithLineString:(SFLineString *)lineString;

    Swift

    init!(lineString: SFLineString!)

    Parameters

    lineString

    line string

    Return Value

    new line string

  • Add a point

    Declaration

    Objective-C

    - (void)addPoint:(SFPoint *)point;

    Swift

    func addPoint(_ point: SFPoint!)

    Parameters

    point

    point

  • Add points

    Declaration

    Objective-C

    - (void)addPoints:(NSArray<SFPoint *> *)points;

    Swift

    func addPoints(_ points: [SFPoint]!)

    Parameters

    points

    points

  • Get the number of points

    Declaration

    Objective-C

    - (int)numPoints;

    Swift

    func numPoints() -> Int32

    Return Value

    point count

  • Returns the Nth point

    Declaration

    Objective-C

    - (SFPoint *)pointAtIndex:(int)n;

    Swift

    func point(at n: Int32) -> SFPoint!

    Parameters

    n

    nth point to return

    Return Value

    point