func blendMode (BlendMode ) -> some View
func compositingGroup () -> some View
Availability 有効性
Technology
func drawingGroup(opaque: Bool
= false, colorMode: ColorRenderingMode
= .nonLinear) -> some View
A view that composites this view’s contents into an offscreen image before display. あるビュー、それはこのビューのもつ内容を画面外画像へと合成を、表示する前にするものです。
opaque
A Boolean value that indicates whether the image is opaque.
あるブール値、それは画像が不透明であるかどうかを指し示します。
The default is false
; if set to true
, the alpha channel of the image must be 1
.
colorMode
One of the working color space and storage formats defined in Color
. The default is Color
.
The drawing
modifier flattens a subtree of views into a single view before rendering it.
In the example below, the contents of the view are composited to a single bitmap; the bitmap is then displayed in place of the view:
VStack {
ZStack {
Text("DrawingGroup")
.foregroundColor(.black)
.padding(20)
.background(Color.red)
Text("DrawingGroup")
.blur(radius: 2)
}
.font(.largeTitle)
.compositingGroup()
.opacity(1.0)
}
.background(Color.white)
.drawingGroup()
Note 注意
Views backed by native platform views may not render into the image. Instead, they log a warning and display a placeholder image to highlight the error. その代わりに、それらは警告を記録します、そしてプレースホルダ画像を表示してそのエラーを目立たせます。
func blendMode (BlendMode ) -> some View
func compositingGroup () -> some View