snapshot-area-01.yaml (1344B)
1 --- 2 root: 3 items: 4 - type: stacking-context 5 bounds: [0, 0, 100, 100] 6 items: 7 # Stacking context snapshotted as "snap0". 8 # Note that the snapshot area is smaller than 9 # the bounds of the stacking context. 10 - type: stacking-context 11 bounds: [0, 0, 200, 200] 12 snapshot: 13 name: "snap0" 14 area: [10, 10, 80, 180] 15 items: 16 - type: rect 17 bounds: [0, 0, 90, 100] 18 color: [0, 150, 0] 19 - type: rect 20 bounds: [10, 100, 90, 100] 21 color: [150, 0, 0] 22 # Stacking context snapshotted as "snap1". 23 # Note that the snapshot area is larger than 24 # the bounds of the stacking context. 25 - type: stacking-context 26 bounds: [0, 300, 200, 200] 27 snapshot: 28 name: "snap1" 29 area: [-10, -10, 120, 220] 30 items: 31 - type: rect 32 bounds: [0, 0, 90, 100] 33 color: [0, 150, 0] 34 - type: rect 35 bounds: [10, 100, 90, 100] 36 color: [150, 0, 0] 37 # Show the two stacking contexts again, as images. 38 # The sizes of the images are match the snapshot areas 39 # to avoid stretching. 40 - image: snapshot(snap0) 41 bounds: [310, 10, 80, 180] 42 43 - image: snapshot(snap1) 44 bounds: [290, 290, 120, 220]