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

Function rectPath

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

Source from the content-addressed store, hash-verified

1201}
1202
1203function rectPath(value: string, position: Position): UIBezierPath {
1204 const arr = value.split(/[\s]+/);
1205 const top = cssValueToDeviceIndependentPixels(arr[0], position.top);
1206 const right = cssValueToDeviceIndependentPixels(arr[1], position.right);
1207 const bottom = cssValueToDeviceIndependentPixels(arr[2], position.bottom);
1208 const left = cssValueToDeviceIndependentPixels(arr[3], position.left);
1209
1210 return UIBezierPath.bezierPathWithRect(CGRectMake(left, top, right - left, bottom - top)).CGPath;
1211}
1212
1213function insetPath(value: string, position: Position): UIBezierPath {
1214 const arr = value.split(/[\s]+/);

Callers 1

generateClipPathFunction · 0.85

Calls 1

Tested by

no test coverage detected