Instance Method
nodeIndex(for:callback:) nodeIndexForHash:callback: nodeIndexForHash_callback_
Enumerates matching node positions for a geometric hash.
Declaration
func nodeIndex(for hash: GSPathHash, callback callbackBlock: @escaping (Int, CGFloat, NSPoint, UnsafeMutablePointer<ObjCBool>) -> Void)Declaration
- (void) nodeIndexForHash:(GSPathHash *) hash callback:(void (^)(NSInteger nodeIdx, CGFloat averageAngle, NSPoint averagePos, BOOL *stop)) callbackBlock;Declaration
nodeIndexForHash_callback_(hash: GSPathHash, nodeIdx: int, averageAngle: float, averagePos: NSPoint, stop: bool, callbackBlock)Discussion
The callback receives the matching node index, the average angle, and the average position. Set stop to YES in the callback to stop enumeration.
See Also
Equality and Comparison
Whether another path has the same closed state, node count, and node positions.
A geometric hash for matching paths with the same node structure.
A transform that maps a geometric hash to the matching position on the path.