(value: string, position: Position)
| 1251 | } |
| 1252 | |
| 1253 | function ellipsePath(value: string, position: Position): UIBezierPath { |
| 1254 | const arr = value.split(/[\s]+/); |
| 1255 | |
| 1256 | const rX = cssValueToDeviceIndependentPixels(arr[0], position.right); |
| 1257 | const rY = cssValueToDeviceIndependentPixels(arr[1], position.bottom); |
| 1258 | const cX = cssValueToDeviceIndependentPixels(arr[3], position.right); |
| 1259 | const cY = cssValueToDeviceIndependentPixels(arr[4], position.bottom); |
| 1260 | |
| 1261 | const left = cX - rX; |
| 1262 | const top = cY - rY; |
| 1263 | const width = rX * 2; |
| 1264 | const height = rY * 2; |
| 1265 | |
| 1266 | return UIBezierPath.bezierPathWithOvalInRect(CGRectMake(left, top, width, height)).CGPath; |
| 1267 | } |
| 1268 | |
| 1269 | function polygonPath(value: string, position: Position): UIBezierPath { |
| 1270 | const path = CGPathCreateMutable(); |
no test coverage detected