applyWithBlock
TypeScriptapplyWithBlock(block: ((arg0: SDKHandle) => void)): voidSwift declarationfunc applyWithBlock(_ block: (UnsafePointer<CGPathElement>) -> Void)class · SDK 27.1
class CGPathapplyWithBlock(block: ((arg0: SDKHandle) => void)): voidSwift declarationfunc applyWithBlock(_ block: (UnsafePointer<CGPathElement>) -> Void)copy(): (CGPath) | nullSwift declarationfunc copy() -> CGPath?copyUsing(transform?: (SDKHandle) | null): (CGPath) | nullSwift declarationfunc copy(using transform: UnsafePointer<CGAffineTransform>?) -> CGPath?mutableCopy(): (CGMutablePath) | nullSwift declarationfunc mutableCopy() -> CGMutablePath?mutableCopyUsing(transform?: (SDKHandle) | null): (CGMutablePath) | nullSwift declarationfunc mutableCopy(using transform: UnsafePointer<CGAffineTransform>?) -> CGMutablePath?static initEllipseInTransform(rect: { x: number; y: number; width: number; height: number }, transform?: (SDKHandle) | null): CGPathSwift declarationinit(ellipseIn rect: CGRect, transform: UnsafePointer<CGAffineTransform>?)static initRectTransform(rect: { x: number; y: number; width: number; height: number }, transform?: (SDKHandle) | null): CGPathSwift declarationinit(rect: CGRect, transform: UnsafePointer<CGAffineTransform>?)static initRoundedRectCornerWidthCornerHeightTransform(rect: { x: number; y: number; width: number; height: number }, cornerWidth: number, cornerHeight: number, transform?: (SDKHandle) | null): CGPathSwift declarationinit(roundedRect rect: CGRect, cornerWidth: CGFloat, cornerHeight: CGFloat, transform: UnsafePointer<CGAffineTransform>?)get boundingBox(): { x: number; y: number; width: number; height: number }Swift declarationvar boundingBox: CGRect { get }get currentPoint(): { x: number; y: number }Swift declarationvar currentPoint: CGPoint { get }get boundingBoxOfPath(): { x: number; y: number; width: number; height: number }Swift declarationvar boundingBoxOfPath: CGRect { get }static get typeID(): numberSwift declarationclass var typeID: CFTypeID { get }get isEmpty(): booleanSwift declarationvar isEmpty: Bool { get }isRect(rect?: ("animatableData" | SDKHandle) | null): booleanSwift declarationfunc isRect(_ rect: UnsafeMutablePointer<CGRect>?) -> Boolintersects(other: CGPath, rule?: CGPathFillRule): booleanSwift declarationfunc intersects(_ other: CGPath, using rule: CGPathFillRule = .winding) -> BoolReturns whether paths overlap. - Parameters: - other: The path to check for intersection. - rule: The rule for determining which areas to treat as the interior of the paths. Defaults to the `CGPathFillRule.winding` rule if not specified. - Returns: `true` if the paths intersect. This is the same as testing if the intersection of two paths is not empty. That is, the filled areas of the paths overlap. Open subpaths are treated as closed subpaths, the same as when filling a path in a `CGContext`.
normalized(rule?: CGPathFillRule): CGPathSwift declarationfunc normalized(using rule: CGPathFillRule = .winding) -> CGPathReturns a new weakly-simple copy of this path. - Parameter rule: The rule for determining which areas to treat as the interior of the path. Defaults to the `CGPathFillRule.winding` rule if not specified. - Returns: A new path. The returned path is weakly-simple path, has no self-intersections, and has a normalized orientation. The result of filling this path using either even-odd or non-zero fill rules is identical.
subtracting(other: CGPath, rule?: CGPathFillRule): CGPathSwift declarationfunc subtracting(_ other: CGPath, using rule: CGPathFillRule = .winding) -> CGPathReturns a new path with filled regions from this path that are not in the given path. - Parameters: - other: The path to subtract. - rule: The rule for determining which areas to treat as the interior of the paths. Defaults to the `CGPathFillRule.winding` rule if not specified. - Returns: A new path. The filled region of the resulting path is the filled region of this path with the filled region `other` removed from it. Any unclosed subpaths in either path are assumed to be closed. The result of filling this path using either even-odd or non-zero fill rules is identical.
intersection(other: CGPath, rule?: CGPathFillRule): CGPathSwift declarationfunc intersection(_ other: CGPath, using rule: CGPathFillRule = .winding) -> CGPathReturns a new path with filled regions common to both paths. - Parameters: - other: The path to intersect. - rule: The rule for determining which areas to treat as the interior of the paths. Defaults to the `CGPathFillRule.winding` rule if not specified. - Returns: A new path. The filled region of the resulting path is the overlapping area of the filled region of both paths. This can be used to clip the fill of a path to a mask. Any unclosed subpaths in either path are assumed to be closed. The result of filling this path using either even-odd or non-zero fill rules is identical.
lineSubtracting(other: CGPath, rule?: CGPathFillRule): CGPathSwift declarationfunc lineSubtracting(_ other: CGPath, using rule: CGPathFillRule = .winding) -> CGPathReturns a new path with a line from this path that does not overlap the filled region of the given path. - Parameters: - other: The path to subtract. - rule: The rule for determining which areas to treat as the interior of `other`. Defaults to the `CGPathFillRule.winding` rule if not specified. - Returns: A new path. The line of the resulting path is the line of this path that does not overlap the filled region of `other`. Intersected subpaths that are clipped create open subpaths. Closed subpaths that do not intersect `other` remain closed.
lineIntersection(other: CGPath, rule?: CGPathFillRule): CGPathSwift declarationfunc lineIntersection(_ other: CGPath, using rule: CGPathFillRule = .winding) -> CGPathReturns a new path with a line from this path that overlaps the filled regions of the given path. - Parameters: - other: The path to intersect. - rule: The rule for determining which areas to treat as the interior of `other`. Defaults to the `CGPathFillRule.winding` rule if not specified. - Returns: A new path. The line of the resulting path is the line of this path that overlaps the filled region of `other`. Intersected subpaths that are clipped create open subpaths. Closed subpaths that do not intersect `other` remain closed.
componentsSeparated(rule?: CGPathFillRule): Array<CGPath>Swift declarationfunc componentsSeparated(using rule: CGPathFillRule = .winding) -> [CGPath]Return an array of the visually separated components of a path. - Parameter rule: The rule for determining which areas to treat as the interior of the path. Defaults to the `CGPathFillRule.winding` rule if not specified. - Returns: The visually separate components. Separating components of a path returns the components from splitting the path into multiple distinct paths. Rendered individually the components look the same as the original path. This can be used to break a single path (eg. a symbol) into its component pieces so that each component can be colored separately.
symmetricDifference(other: CGPath, rule?: CGPathFillRule): CGPathSwift declarationfunc symmetricDifference(_ other: CGPath, using rule: CGPathFillRule = .winding) -> CGPathReturns a new path with filled regions either from this path or the given path, but not in both. - Parameters: - other: The path to difference. - rule: The rule for determining which areas to treat as the interior of the paths. Defaults to the `CGPathFillRule.winding` rule if not specified. - Returns: A new path. The filled region of the resulting path is the filled region contained in either this path or `other`, but not both. Any unclosed subpaths in either path are assumed to be closed. The result of filling this path using either even-odd or non-zero fill rules is identical.
copyDashingWithPhaseLengthsTransform(phase: number, lengths: Array<number>, transform?: _CoreFoundation_CGAffineTransform): CGPathSwift declarationfunc copy(dashingWithPhase phase: CGFloat, lengths: [CGFloat], transform: CGAffineTransform = .identity) -> CGPathcopyStrokingWithWidthLineCapLineJoinMiterLimitTransform(lineWidth: number, lineCap: CGLineCap, lineJoin: CGLineJoin, miterLimit: number, transform?: _CoreFoundation_CGAffineTransform): CGPathSwift declarationfunc copy(strokingWithWidth lineWidth: CGFloat, lineCap: CGLineCap, lineJoin: CGLineJoin, miterLimit: CGFloat, transform: CGAffineTransform = .identity) -> CGPathunion(other: CGPath, rule?: CGPathFillRule): CGPathSwift declarationfunc union(_ other: CGPath, using rule: CGPathFillRule = .winding) -> CGPathReturns a new path with filled regions in either this path or the given path. - Parameters: - other: The path to union. - rule: The rule for determining which areas to treat as the interior of the paths. Defaults to the `CGPathFillRule.winding` rule if not specified. - Returns: A new path. The filled region of resulting path is the combination of the filled region of both paths added together. Any unclosed subpaths in either path are assumed to be closed. The result of filling this path using either even-odd or non-zero fill rules is identical.
contains(point: { x: number; y: number }, rule?: CGPathFillRule, transform?: _CoreFoundation_CGAffineTransform): booleanSwift declarationfunc contains(_ point: CGPoint, using rule: CGPathFillRule = .winding, transform: CGAffineTransform = .identity) -> Boolflattened(threshold: number): CGPathSwift declarationfunc flattened(threshold: CGFloat) -> CGPathReturns a flattened copy of this path. - Parameter threshold: The maximum error tolerance. - Returns: A new path. The granularity of the approximation is controlled by `threshold` the maximum error tolerance (measured in points) for curves.
1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.
CGPath.apply(info:function:)
The iOS SDK compiler rejected this binding: a C function pointer cannot be formed from a closure that captures context