mirror of
https://github.com/status-im/react-native.git
synced 2025-01-29 02:35:41 +00:00
25664cc48c
Summary: Quite obvious. Reviewed By: mdvacca Differential Revision: D7857051 fbshipit-source-id: 85aa6a9c064e5aebe65486acd011d445efaf0ce8
35 lines
926 B
Objective-C
35 lines
926 B
Objective-C
/**
|
|
* Copyright (c) 2015-present, Facebook, Inc.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
#import <UIKit/UIKit.h>
|
|
|
|
#import <fabric/graphics/Geometry.h>
|
|
|
|
inline CGPoint RCTCGPointFromPoint(facebook::react::Point point) {
|
|
return {point.x, point.y};
|
|
}
|
|
|
|
inline CGSize RCTCGSizeFromSize(facebook::react::Size size) {
|
|
return {size.width, size.height};
|
|
}
|
|
|
|
inline CGRect RCTCGRectFromRect(facebook::react::Rect rect) {
|
|
return {RCTCGPointFromPoint(rect.origin), RCTCGSizeFromSize(rect.size)};
|
|
}
|
|
|
|
inline facebook::react::Point RCTPointFromCGPoint(CGPoint point) {
|
|
return {point.x, point.y};
|
|
}
|
|
|
|
inline facebook::react::Size RCTSizeFromCGSize(CGSize size) {
|
|
return {size.width, size.height};
|
|
}
|
|
|
|
inline facebook::react::Rect RCTRectFromCGRect(CGRect rect) {
|
|
return {RCTPointFromCGPoint(rect.origin), RCTSizeFromCGSize(rect.size)};
|
|
}
|