Debian Codegraph @

testsuite/gsk/compare/small-cairo-node-fractional-edge-case.node

raw
1 /* put a node to avoid "downsizing" and make its border the same color the
2 same as the Cairo node below to cover rouding errors. */
3 border {
4 outline: 0 0 1071 10;
5 colors: red;
6 widths: 1;
7 }
8
9 /* Size the area just right */
10 clip {
11 clip: 46 0 1025 10;
12
13 /* Now for the actual test. First, apply the application's scale: */
14 child: transform {
15 transform: scale(1.69999992847442626953125) translate(46, 0);
16
17 child: container {
18 /* first, draw something to not cause the transform node to be downsized */
19 color {
20 bounds: 0 0 10 10;
21 color: transparent;
22 }
23
24 /* then draw the Cairo node at the right location to make it go boom */
25 cairo {
26 bounds: 584 0 10 10;
27 pixels: url("data:image/png;base64,\
28 iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAIAAAACUFjqAAAABmJLR0QA/wD/AP+gvaeTAAAAEklE\
29 QVQYlWP8z4APMOGVHbHSAEEsARM3dz+eAAAAAElFTkSuQmCC\
30 ");
31 script: url("data:,\
32 %25%21CairoScript%0A\
33 << /content //COLOR_ALPHA /width 10 /height 10 >> surface context \
34 1 0 0 rgb set-source \
35 paint \
36 pop");
37 }
38 }
39 }
40 }