SBSDKPayFormPolygon

@interface SBSDKPayFormPolygon : NSObject

Describes an ordered collection of geometric points in the images coordinate system. Used to express boxes and rectangles in non-perspective-corrected images.

  • An UIBezierPath instance describing a closed path along the receivers points.

    Declaration

    Objective-C

    @property (readonly, strong, nonatomic, nonnull) UIBezierPath *path;

    Swift

    var path: UIBezierPath { get }
  • The number of points the receiver holds.

    Declaration

    Objective-C

    @property (readonly, assign, nonatomic) NSUInteger pointCount;

    Swift

    var pointCount: UInt { get }
  • Convenience initializer taking a C-style array of CGPoints and the number of points.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithPoints:(nonnull CGPoint *)points
                                     count:(NSUInteger)pointCount;

    Swift

    init(points: UnsafeMutablePointer<CGPoint>, count pointCount: UInt)
  • Convenience initializer taking a NSArray of NSValue objects, e.g. [NSValue valueWithCGPoint:point].

    Declaration

    Objective-C

    - (nonnull instancetype)initWithPointValues:
        (nonnull NSArray<NSValue *> *)pointValues;

    Swift

    init(pointValues: [NSValue])
  • Returns the CGPoint at the given index. Does not perform bounds check.

    Declaration

    Objective-C

    - (CGPoint)pointAtIndex:(NSUInteger)index;

    Swift

    func point(at index: UInt) -> CGPoint