SFCurvePolygon

Objective-C

@interface SFCurvePolygon : SFSurface

Swift

class SFCurvePolygon : SFSurface

A planar surface defined by an exterior ring and zero or more interior ring. Each ring is defined by a Curve instance.

  • Array of rings

    Declaration

    Objective-C

    @property (nonatomic, strong) NSMutableArray<SFCurve *> *rings;

    Swift

    var rings: NSMutableArray! { get set }
  • Create

    Declaration

    Objective-C

    + (SFCurvePolygon *)curvePolygon;

    Return Value

    new curve polygon

  • Create

    Declaration

    Objective-C

    + (SFCurvePolygon *)curvePolygonWithHasZ:(BOOL)hasZ andHasM:(BOOL)hasM;

    Parameters

    hasZ

    has z values

    hasM

    has m values

    Return Value

    new curve polygon

  • Create

    Declaration

    Objective-C

    + (SFCurvePolygon *)curvePolygonWithRings:(NSMutableArray<SFCurve *> *)rings;

    Parameters

    rings

    list of rings

    Return Value

    new curve polygon

  • Create

    Declaration

    Objective-C

    + (SFCurvePolygon *)curvePolygonWithRing:(SFCurve *)ring;

    Parameters

    ring

    ring

    Return Value

    new curve polygon

  • Create

    Declaration

    Objective-C

    + (SFCurvePolygon *)curvePolygonWithCurvePolygon:(SFCurvePolygon *)curvePolygon;

    Parameters

    curvePolygon

    curve polygon

    Return Value

    new curve polygon

  • Initialize

    Declaration

    Objective-C

    - (instancetype)init;

    Swift

    init!()

    Return Value

    new curve polygon

  • 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 curve polygon

  • Initialize

    Declaration

    Objective-C

    - (instancetype)initWithRings:(NSMutableArray<SFCurve *> *)rings;

    Swift

    init!(rings: NSMutableArray!)

    Parameters

    rings

    list of rings

    Return Value

    new curve polygon

  • Initialize

    Declaration

    Objective-C

    - (instancetype)initWithRing:(SFCurve *)ring;

    Swift

    init!(ring: SFCurve!)

    Parameters

    ring

    ring

    Return Value

    new curve polygon

  • 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 curve polygon

  • Initialize

    Declaration

    Objective-C

    - (instancetype)initWithCurvePolygon:(SFCurvePolygon *)curvePolygon;

    Swift

    init!(curvePolygon: SFCurvePolygon!)

    Parameters

    curvePolygon

    curve polygon

    Return Value

    new curve polygon

  • Add a ring

    Declaration

    Objective-C

    - (void)addRing:(SFCurve *)ring;

    Swift

    func addRing(_ ring: SFCurve!)

    Parameters

    ring

    curve ring

  • Add rings

    Declaration

    Objective-C

    - (void)addRings:(NSArray<SFCurve *> *)rings;

    Swift

    func addRings(_ rings: [SFCurve]!)

    Parameters

    rings

    rings

  • Get the number of rings

    Declaration

    Objective-C

    - (int)numRings;

    Swift

    func numRings() -> Int32

    Return Value

    ring count

  • Returns the Nth ring where the exterior ring is at 0, interior rings begin at 1

    Declaration

    Objective-C

    - (SFCurve *)ringAtIndex:(int)n;

    Swift

    func ring(at n: Int32) -> SFCurve!

    Parameters

    n

    nth ring to return

    Return Value

    ring

  • Get the exterior ring

    Declaration

    Objective-C

    - (SFCurve *)exteriorRing;

    Swift

    func exteriorRing() -> SFCurve!

    Return Value

    exterior ring

  • Get the number of interior rings

    Declaration

    Objective-C

    - (int)numInteriorRings;

    Swift

    func numInteriorRings() -> Int32

    Return Value

    number of interior rings

  • Returns the Nth interior ring for this Polygon

    Declaration

    Objective-C

    - (SFCurve *)interiorRingAtIndex:(int)n;

    Swift

    func interiorRing(at n: Int32) -> SFCurve!

    Parameters

    n

    interior ring number

    Return Value

    interior ring