mirror of
https://github.com/exyte/Macaw.git
synced 2024-09-11 05:05:23 +03:00
Replace test references
This commit is contained in:
parent
62a8a863bf
commit
b3d3809e59
Binary file not shown.
Binary file not shown.
@ -137,19 +137,7 @@ public extension Node {
|
||||
|
||||
func toNativeImage(size: Size, layout: ContentLayout = .of()) -> MImage {
|
||||
let renderer = RenderUtils.createNodeRenderer(self, view: nil)
|
||||
let rect = size.rect()
|
||||
|
||||
MGraphicsBeginImageContextWithOptions(size.toCG(), false, 1)
|
||||
let ctx = MGraphicsGetCurrentContext()!
|
||||
ctx.clear(rect.toCG())
|
||||
|
||||
let transform = LayoutHelper.calcTransform(self, layout, size)
|
||||
ctx.concatenate(transform.toCG())
|
||||
renderer.render(in: ctx, force: false, opacity: self.opacity)
|
||||
|
||||
let img = MGraphicsGetImageFromCurrentImageContext()
|
||||
MGraphicsEndImageContext()
|
||||
return img!
|
||||
return renderer.renderToImage(bounds: size.rect())
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user