You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, using cacheDisplay produces some side-effects and the resulting image does not exactly match View as displayed.
To get around some display issues, we tell SwiftUI to first flatten view hierarchy by itself using the drawingGroup modifier.
But even this has some weirdness, especially with blend modes. First of all, it loses all transparency, but that part is at least consistent with previews/actual rendering after using drawingGroup.
Using .overlay(Color.mint.blendMode(.hue)):
We can get around that by masking the result with the initial view:
ImageRenderer does seem to eliminate blend mode problems, but so does cacheDisplay in Ventura 🤔
cacheDisplay
ImageRenderer
ImageRenderer output seems to be blurry, but maybe I'm just holding it wrong. Will revisit later, for now experimental support is in feature/ImageRenderer branch.
These are current view capture steps:
cacheDisplay(in:to:)
However, using
cacheDisplay
produces some side-effects and the resulting image does not exactly match View as displayed.To get around some display issues, we tell SwiftUI to first flatten view hierarchy by itself using the drawingGroup modifier.
But even this has some weirdness, especially with blend modes. First of all, it loses all transparency, but that part is at least consistent with previews/actual rendering after using
drawingGroup
.Using
.overlay(Color.mint.blendMode(.hue))
:We can get around that by masking the result with the initial view:
NewIcon/SampleTemplates/NewHue.swift
Line 53 in f441f60
But this still leaves us with incorrectly blended color in some parts.
Compare to how this looks in previews and when displayed in a window.
The text was updated successfully, but these errors were encountered: