Instance Method
withUnsafePoints(_:)
Calls a closure with the contiguous point storage.
Not available in Objective-C.Not available in Python.
Declaration
func withUnsafePoints<E, Result>(_ body: (UnsafeBufferPointer<CGPoint>) throws(E) -> Result) throws(E) -> Result where E : ErrorParameters
bodyA closure that receives the points without copying them.
Return Value
The value returned by the closure.
Discussion
The buffer is valid only for the duration of the closure. Do not mutate the point array while the closure is executing.