File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -92,6 +92,7 @@ extension LayerTree {
9292 l. transform = Builder . createTransforms ( from: element. transform ?? [ ] )
9393 l. clip = createClipShapes ( for: element)
9494 l. mask = createMaskLayer ( for: element)
95+ l. opacity = state. opacity
9596
9697 if let contents = createContents ( from: element, with: state) {
9798 l. appendContents ( contents)
@@ -270,7 +271,7 @@ extension LayerTree.Builder {
270271 static func createState( for attributes: PresentationAttributes , inheriting existing: State ) -> State {
271272 var state = State ( )
272273
273- state. opacity = attributes. opacity ?? existing . opacity
274+ state. opacity = attributes. opacity ?? 1.0
274275 state. display = attributes. display ?? existing. display
275276
276277 state. stroke = attributes. stroke ?? existing. stroke
Original file line number Diff line number Diff line change @@ -169,6 +169,10 @@ extension LayerTree.Layer {
169169 desc += mask. customDescription ( indent: indent, title: " Mask " )
170170 }
171171
172+ if opacity != 1.0 {
173+ desc += " \( whitepace) Opacity: \( opacity) \n "
174+ }
175+
172176 self . contents. forEach {
173177 desc += $0. customDescription ( indent: indent + 3 ) + " \n "
174178 }
You can’t perform that action at this time.
0 commit comments