|
8 | 8 |
|
9 | 9 | using namespace OB; |
10 | 10 |
|
11 | | -void OBPathStorageInit(OBPathStorage* dst, uint32_t capacity, OBPathStorage* source) { |
| 11 | +void OBPathStorageInit(OBPathStorageRef dst, uint32_t capacity, OBPathStorageRef source) { |
12 | 12 | if (source != nullptr) { |
13 | 13 | dst->storage = OB::Path::Storage(capacity, source->storage); |
14 | 14 | } else { |
15 | 15 | dst->storage = OB::Path::Storage(capacity); |
16 | 16 | } |
17 | 17 | } |
18 | 18 |
|
19 | | -void OBPathStorageDestroy(OBPathStorage storage) { |
20 | | - storage.storage.~Storage(); |
| 19 | +void OBPathStorageDestroy(OBPathStorageRef storage) { |
| 20 | + storage->storage.~Storage(); |
21 | 21 | } |
22 | 22 |
|
23 | | -void OBPathStorageClear(OBPathStorage storage) { |
24 | | - storage.storage.clear(); |
| 23 | +void OBPathStorageClear(OBPathStorageRef storage) { |
| 24 | + storage->storage.clear(); |
25 | 25 | } |
26 | 26 |
|
27 | 27 | // ... |
28 | 28 |
|
29 | | -bool OBPathStorageIsEmpty(OBPathStorage storage) { |
30 | | - return storage.storage.isEmpty(); |
| 29 | +bool OBPathStorageIsEmpty(OBPathStorageRef storage) { |
| 30 | + return storage->storage.isEmpty(); |
31 | 31 | } |
32 | 32 |
|
33 | | -bool OBPathStorageEqualToStorage(OBPathStorage lhs, OBPathStorage rhs) { |
34 | | - return lhs.storage == rhs.storage; |
| 33 | +bool OBPathStorageEqualToStorage(OBPathStorageRef lhs, OBPathStorageRef rhs) { |
| 34 | + return lhs->storage == rhs->storage; |
35 | 35 | } |
36 | 36 |
|
37 | | -bool OBPathStorageIsSingleElement(OBPathStorage storage) { |
38 | | - return storage.storage.flags().isSingleElement(); |
| 37 | +bool OBPathStorageIsSingleElement(OBPathStorageRef storage) { |
| 38 | + return storage->storage.flags().isSingleElement(); |
39 | 39 | } |
40 | 40 |
|
41 | | -uint32_t OBPathStorageGetBezierOrder(OBPathStorage storage) { |
42 | | - return storage.storage.flags().bezierOrder(); |
| 41 | +uint32_t OBPathStorageGetBezierOrder(OBPathStorageRef storage) { |
| 42 | + return storage->storage.flags().bezierOrder(); |
43 | 43 | } |
44 | 44 |
|
45 | 45 | #if OB_TARGET_OS_DARWIN |
46 | 46 |
|
47 | | -CGRect OBPathStorageGetBoundingRect(OBPathStorage storage) { |
| 47 | +CGRect OBPathStorageGetBoundingRect(OBPathStorageRef storage) { |
48 | 48 | precondition_failure("TODO"); |
49 | 49 | } |
50 | 50 |
|
51 | | -CGPathRef OBPathStorageGetCGPath(OBPathStorage storage) { |
| 51 | +CGPathRef OBPathStorageGetCGPath(OBPathStorageRef storage) { |
52 | 52 | precondition_failure("TODO"); |
53 | 53 | } |
54 | 54 | #endif |
0 commit comments