summaryrefslogtreecommitdiffstats
path: root/gfx/wr/wrench/reftests/gradient/gradient_cache_repeat.yaml
blob: 20a07a72a62afcd5846703f6d088d5be7147364e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
---
root:
  items:
      # non-repeating
    - type: gradient
      bounds: 100 50 500 10
      start: 100 0
      end: 200 0
      repeat: false
      stops: [0.0, green,
              0.5, green,
              0.5, blue,
              1.0, blue ]

      # repeat 4 times
    - type: gradient
      bounds: 100 100 500 10
      start: 100 0
      end: 200 0
      repeat: true
      stops: [0.0, green,
              0.5, green,
              0.5, blue,
              1.0, blue ]

      # same but start doesn't line up with 0
    - type: gradient
      bounds: 100 150 500 10
      start: 125 0
      end: 225 0
      repeat: true
      stops: [0.0, green,
              0.5, green,
              0.5, blue,
              1.0, blue ]

      # more hard stops, non-uniform distribution
    - type: gradient
      bounds: 100 250 500 10
      start: 200 0
      end: 300 0
      repeat: false
      stops: [0.0, green,
              0.25, green,
              0.25, red,
              0.75, red,
              0.75, blue,
              1.0, blue ]

      # repeat the hard stops
    - type: gradient
      bounds: 100 300 500 10
      start: 200 0
      end: 300 0
      repeat: true
      stops: [0.0, green,
              0.25, green,
              0.25, red,
              0.75, red,
              0.75, blue,
              1.0, blue ]

      # same but start doesn't line up with 0
    - type: gradient
      bounds: 100 350 500 10
      start: 175 0
      end: 275 0
      repeat: true
      stops: [0.0, green,
              0.25, green,
              0.25, red,
              0.75, red,
              0.75, blue,
              1.0, blue ]

      # the entire gradient from 0 to 1 is
      # "offscreen", we're only seeing its
      # repeats. the gradient is 100 wide
      # and ends at -75, so the first
      # three-quarters of it would be hidden,
      # that is, it should start with blue.
    - type: gradient
      bounds: 100 400 500 10
      start: -175 0
      end: -75 0
      repeat: true
      stops: [0.0, green,
              0.25, green,
              0.25, red,
              0.75, red,
              0.75, blue,
              1.0, blue ]

      # same but over on the right
    - type: gradient
      bounds: 100 450 500 10
      start: 575 0
      end: 675 0
      repeat: true
      stops: [0.0, green,
              0.25, green,
              0.25, red,
              0.75, red,
              0.75, blue,
              1.0, blue ]

      # a repeat, but not really because only part
      # of the gradient is visible
    - type: gradient
      bounds: 100 500 500 10
      start: -50 0
      end: 550 0
      repeat: true
      stops: [0.0, green,
              0.25, green,
              0.25, red,
              0.75, red,
              0.75, blue,
              1.0, blue ]