@@ -25,21 +25,6 @@ static const ORBPathCallbacks empty_path_callbacks = {
2525 nullptr ,
2626};
2727
28- namespace {
29- ORBPath make_rect (CGRect rect, const CGAffineTransform *transform, ORBPathElement element) {
30- if (CGRectIsNull (rect)) {
31- return ORBPathNull;
32- }
33- if (transform == nullptr || CGAffineTransformIsIdentity (*transform)) {
34- // TODO
35- return ORBPathNull;
36- } else {
37- // TODO
38- return ORBPathNull;
39- }
40- }
41- } /* anonymous namespace */
42-
4328// Empty path (storage = null)
4429const ORBPath ORBPathEmpty = {
4530 nullptr ,
@@ -70,6 +55,21 @@ void ORBPathRelease(ORBPath path) {
7055
7156// MARK: - Path Creation
7257
58+ namespace {
59+ ORBPath make_rect (CGRect rect, const CGAffineTransform *transform, ORBPathElement element) {
60+ if (CGRectIsNull (rect)) {
61+ return ORBPathNull;
62+ }
63+ if (transform == nullptr || CGAffineTransformIsIdentity (*transform)) {
64+ // TODO
65+ return ORBPathNull;
66+ } else {
67+ // TODO
68+ return ORBPathNull;
69+ }
70+ }
71+ } /* anonymous namespace */
72+
7373// TODO: TO be implemented natively
7474
7575ORBPath ORBPathMakeWithCGPath (CGPathRef cgPath) {
@@ -157,6 +157,8 @@ bool ORBPathContainsPoints(ORBPath path, uint64_t count, const CGPoint *points,
157157 return false ;
158158}
159159
160+ #endif /* ORB_TARGET_OS_DARWIN */
161+
160162bool ORBPathApplyElements (ORBPath path, void *info, ORBPathApplyCallback callback) {
161163 auto apply = path.callbacks ->apply ;
162164 bool flag = false ; // TODO: calllbacks's flag to indicate whether it supports extra features
@@ -172,5 +174,3 @@ bool ORBPathApplyElements(ORBPath path, void *info, ORBPathApplyCallback callbac
172174 return apply (path.storage , info, callback);
173175 }
174176}
175-
176- #endif /* ORB_TARGET_OS_DARWIN */
0 commit comments