-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: rename compat UIGraphics to RNSVGUIGraphics to avoid duplicated …
…symbols
- Loading branch information
Showing
7 changed files
with
22 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,10 @@ | |
#define RNSVGView UIView | ||
#endif // RCT_NEW_ARCH_ENABLED | ||
|
||
#define RNSVGUIGraphicsBeginImageContextWithOptions UIGraphicsBeginImageContextWithOptions | ||
#define RNSVGUIGraphicsEndImageContext UIGraphicsEndImageContext | ||
#define RNSVGUIGraphicsGetImageFromCurrentImageContext UIGraphicsGetImageFromCurrentImageContext | ||
|
||
#else // TARGET_OS_OSX [ | ||
|
||
// Due to name mangling, calling c-style functions from .mm files will fail, therefore we need to wrap them with extern | ||
|
@@ -70,8 +74,8 @@ extern "C" { | |
// These functions are copied from react-native-macos to enable compatibility with [email protected]+ | ||
// https://github.com/microsoft/react-native-macos/blob/7361b165ef633d3d95dbdb69da58ff6119f07369/packages/react-native/React/Base/macOS/RCTUIKit.m | ||
// See https://github.com/software-mansion/react-native-svg/issues/2528 | ||
void UIGraphicsBeginImageContextWithOptions(CGSize size, __unused BOOL opaque, CGFloat scale); | ||
void UIGraphicsEndImageContext(void); | ||
NSImage *UIGraphicsGetImageFromCurrentImageContext(void); | ||
void RNSVGUIGraphicsBeginImageContextWithOptions(CGSize size, __unused BOOL opaque, CGFloat scale); | ||
void RNSVGUIGraphicsEndImageContext(void); | ||
NSImage *RNSVGUIGraphicsGetImageFromCurrentImageContext(void); | ||
|
||
#endif // ] TARGET_OS_OSX |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters