mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-05-25 03:53:31 +00:00
fix(ios): Fix image size when calling getDataURL with bounds. fixes #855
UIGraphicsBeginImageContextWithOptions third argument was incorrect: https://developer.apple.com/documentation/uikit/1623912-uigraphicsbeginimagecontextwitho The scale factor to apply to the bitmap. If you specify a value of 0.0, the scale factor is set to the scale factor of the device’s main screen.
This commit is contained in:
@@ -268,7 +268,7 @@
|
||||
|
||||
- (NSString *)getDataURLwithBounds:(CGRect)bounds
|
||||
{
|
||||
UIGraphicsBeginImageContextWithOptions(bounds.size, NO, 0);
|
||||
UIGraphicsBeginImageContextWithOptions(bounds.size, NO, 1);
|
||||
[self clearChildCache];
|
||||
[self drawRect:bounds];
|
||||
[self clearChildCache];
|
||||
|
||||
Reference in New Issue
Block a user