MCPcopy Create free account
hub / github.com/NativeScript/NativeScript / circlePath

Function circlePath

packages/core/ui/styling/background.ios.ts:1244–1251  ·  view source on GitHub ↗
(value: string, position: Position)

Source from the content-addressed store, hash-verified

1242}
1243
1244function circlePath(value: string, position: Position): UIBezierPath {
1245 const arr = value.split(/[\s]+/);
1246 const radius = cssValueToDeviceIndependentPixels(arr[0], (position.right > position.bottom ? position.bottom : position.right) / 2);
1247 const y = cssValueToDeviceIndependentPixels(arr[2], position.bottom);
1248 const x = cssValueToDeviceIndependentPixels(arr[3], position.right);
1249
1250 return UIBezierPath.bezierPathWithArcCenterRadiusStartAngleEndAngleClockwise(CGPointMake(x, y), radius, 0, 360, true).CGPath;
1251}
1252
1253function ellipsePath(value: string, position: Position): UIBezierPath {
1254 const arr = value.split(/[\s]+/);

Callers 1

generateClipPathFunction · 0.85

Calls 1

Tested by

no test coverage detected