Source code
Revision control
Copy as Markdown
Other Tools
# axis-aligned linear gradient were computed by adding a segment length to the
# previous edge, so consecutive segments rounded to device space with a gap
# between them and the background showed through as thin vertical seams.
#
# The gradient sits at x = 1116000 inside a reference frame that translates it
# back into view; 100 stops give enough segments for the accumulated rounding
# error to open a seam. The reference draws the same gradient at the origin,
# where the coordinates are small enough that the rounding is exact.
---
root:
items:
- type: rect
bounds: [0, 0, 400, 240]
color: white
- type: stacking-context
bounds: [0, 0, 0, 0]
transform: translate(-1116000, 0)
items:
- type: gradient
bounds: 1116000 20 300 200
start: 0 0
end: 300 0
stops: [0.0, [20, 10, 100, 1.0],
0.010101, [20, 10, 101, 1.0],
0.020202, [21, 10, 102, 1.0],
0.030303, [21, 10, 103, 1.0],
0.040404, [22, 10, 104, 1.0],
0.050505, [23, 11, 105, 1.0],
0.060606, [23, 11, 106, 1.0],
0.070707, [24, 11, 107, 1.0],
0.080808, [24, 11, 108, 1.0],
0.090909, [25, 11, 109, 1.0],
0.10101, [26, 12, 110, 1.0],
0.111111, [26, 12, 111, 1.0],
0.121212, [27, 12, 112, 1.0],
0.131313, [27, 12, 113, 1.0],
0.141414, [28, 12, 114, 1.0],
0.151515, [29, 13, 115, 1.0],
0.161616, [29, 13, 116, 1.0],
0.171717, [30, 13, 117, 1.0],
0.181818, [30, 13, 118, 1.0],
0.191919, [31, 13, 119, 1.0],
0.20202, [32, 14, 120, 1.0],
0.212121, [32, 14, 121, 1.0],
0.222222, [33, 14, 122, 1.0],
0.232323, [33, 14, 123, 1.0],
0.242424, [34, 14, 124, 1.0],
0.252525, [35, 15, 125, 1.0],
0.262626, [35, 15, 126, 1.0],
0.272727, [36, 15, 127, 1.0],
0.282828, [36, 15, 128, 1.0],
0.292929, [37, 15, 129, 1.0],
0.30303, [38, 16, 130, 1.0],
0.313131, [38, 16, 131, 1.0],
0.323232, [39, 16, 132, 1.0],
0.333333, [40, 16, 133, 1.0],
0.343434, [40, 16, 134, 1.0],
0.353535, [41, 17, 135, 1.0],
0.363636, [41, 17, 136, 1.0],
0.373737, [42, 17, 137, 1.0],
0.383838, [43, 17, 138, 1.0],
0.393939, [43, 17, 139, 1.0],
0.40404, [44, 18, 140, 1.0],
0.414141, [44, 18, 141, 1.0],
0.424242, [45, 18, 142, 1.0],
0.434343, [46, 18, 143, 1.0],
0.444444, [46, 18, 144, 1.0],
0.454545, [47, 19, 145, 1.0],
0.464646, [47, 19, 146, 1.0],
0.474747, [48, 19, 147, 1.0],
0.484848, [49, 19, 148, 1.0],
0.494949, [49, 19, 149, 1.0],
0.505051, [50, 20, 150, 1.0],
0.515152, [50, 20, 151, 1.0],
0.525253, [51, 20, 152, 1.0],
0.535354, [52, 20, 153, 1.0],
0.545455, [52, 20, 154, 1.0],
0.555556, [53, 21, 155, 1.0],
0.565657, [53, 21, 156, 1.0],
0.575758, [54, 21, 157, 1.0],
0.585859, [55, 21, 158, 1.0],
0.59596, [55, 21, 159, 1.0],
0.606061, [56, 22, 160, 1.0],
0.616162, [56, 22, 161, 1.0],
0.626263, [57, 22, 162, 1.0],
0.636364, [58, 22, 163, 1.0],
0.646465, [58, 22, 164, 1.0],
0.656566, [59, 23, 165, 1.0],
0.666667, [60, 23, 166, 1.0],
0.676768, [60, 23, 167, 1.0],
0.686869, [61, 23, 168, 1.0],
0.69697, [61, 23, 169, 1.0],
0.707071, [62, 24, 170, 1.0],
0.717172, [63, 24, 171, 1.0],
0.727273, [63, 24, 172, 1.0],
0.737374, [64, 24, 173, 1.0],
0.747475, [64, 24, 174, 1.0],
0.757576, [65, 25, 175, 1.0],
0.767677, [66, 25, 176, 1.0],
0.777778, [66, 25, 177, 1.0],
0.787879, [67, 25, 178, 1.0],
0.79798, [67, 25, 179, 1.0],
0.808081, [68, 26, 180, 1.0],
0.818182, [69, 26, 181, 1.0],
0.828283, [69, 26, 182, 1.0],
0.838384, [70, 26, 183, 1.0],
0.848485, [70, 26, 184, 1.0],
0.858586, [71, 27, 185, 1.0],
0.868687, [72, 27, 186, 1.0],
0.878788, [72, 27, 187, 1.0],
0.888889, [73, 27, 188, 1.0],
0.89899, [73, 27, 189, 1.0],
0.909091, [74, 28, 190, 1.0],
0.919192, [75, 28, 191, 1.0],
0.929293, [75, 28, 192, 1.0],
0.939394, [76, 28, 193, 1.0],
0.949495, [76, 28, 194, 1.0],
0.959596, [77, 29, 195, 1.0],
0.969697, [78, 29, 196, 1.0],
0.979798, [78, 29, 197, 1.0],
0.989899, [79, 29, 198, 1.0],
1.0, [80, 30, 200, 1.0]]