From 197903c1318e79f4dc8f4be4cf980c0a0e60fddd Mon Sep 17 00:00:00 2001 From: Sebastian Bott Date: Thu, 2 Dec 2021 17:42:08 +0100 Subject: [PATCH 1/3] Add render dispose --- Source/utils/CGMappings.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/Source/utils/CGMappings.swift b/Source/utils/CGMappings.swift index 591db14b..92a89c6d 100644 --- a/Source/utils/CGMappings.swift +++ b/Source/utils/CGMappings.swift @@ -149,6 +149,7 @@ public extension Node { defer { MGraphicsEndImageContext() + renderer.dispose() } guard let img = MGraphicsGetImageFromCurrentImageContext() else { From 96e4900855af0423b595cff0b4c4f49805b527ef Mon Sep 17 00:00:00 2001 From: Sebastian Bott Date: Thu, 2 Dec 2021 17:42:32 +0100 Subject: [PATCH 2/3] Fix native image scale --- Source/utils/CGMappings.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/utils/CGMappings.swift b/Source/utils/CGMappings.swift index 92a89c6d..d2f247f7 100644 --- a/Source/utils/CGMappings.swift +++ b/Source/utils/CGMappings.swift @@ -135,11 +135,11 @@ public extension CGAffineTransform { public extension Node { - func toNativeImage(size: Size, layout: ContentLayout = .of()) throws -> MImage { + func toNativeImage(size: Size, layout: ContentLayout = .of(), scale: CGFloat = 0.0) throws -> MImage { let renderer = RenderUtils.createNodeRenderer(self, view: nil) let rect = size.rect() - MGraphicsBeginImageContextWithOptions(size.toCG(), false, 1) + MGraphicsBeginImageContextWithOptions(size.toCG(), false, scale) let ctx = MGraphicsGetCurrentContext()! ctx.clear(rect.toCG()) From 9797fb0dbdbf33e29645e6c06a1ce9c6b7622a30 Mon Sep 17 00:00:00 2001 From: Sebastian Bott Date: Thu, 2 Dec 2021 17:42:55 +0100 Subject: [PATCH 3/3] Bump version --- Macaw.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Macaw.podspec b/Macaw.podspec index 94843528..d46b8b5f 100644 --- a/Macaw.podspec +++ b/Macaw.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.name = "Macaw" - s.version = "0.9.9" + s.version = "0.9.10" s.summary = "Powerful and easy-to-use vector graphics library with SVG support written in Swift." s.homepage = 'https://github.com/exyte/Macaw.git'