{
  "shadings": [
    {
      "name": "horizontal",
      "shading": {
        "axial": {
          "from": [70.0, 560.0],
          "to": [280.0, 560.0],
          "start": [0.85, 0.12, 0.12],
          "end": [0.12, 0.2, 0.8]
        }
      }
    },
    {
      "name": "diagonal",
      "shading": {
        "axial": {
          "from": [315.0, 490.0],
          "to": [525.0, 730.0],
          "start": [0.95, 0.8, 0.1],
          "end": [0.1, 0.55, 0.2]
        }
      }
    },
    {
      "name": "radial",
      "shading": {
        "radial": {
          "from": [175.0, 405.0, 0.0],
          "to": [175.0, 405.0, 105.0],
          "start": [1.0, 1.0, 1.0],
          "end": [0.1, 0.15, 0.45],
          "extend": [false, true]
        }
      }
    },
    {
      "name": "three_stops",
      "shading": {
        "axial": {
          "from": [315.0, 320.0],
          "to": [525.0, 320.0],
          "space": "rgb",
          "function": {
            "stitching": {
              "functions": [
                {
                  "exponential": {
                    "low": [0.85, 0.12, 0.12],
                    "high": [0.12, 0.6, 0.2]
                  }
                },
                {
                  "exponential": {
                    "low": [0.12, 0.6, 0.2],
                    "high": [0.12, 0.2, 0.8]
                  }
                }
              ],
              "bounds": [0.5],
              "encode": [[0.0, 1.0], [0.0, 1.0]]
            }
          }
        }
      }
    },
    {
      "name": "checkerboard",
      "shading": {
        "function_based": {
          "anti_alias": true,
          "domain": [[0.0, 1.0], [0.0, 1.0]],
          "matrix": [210.0, 0.0, 0.0, 170.0, 70.0, 100.0],
          "space": "rgb",
          "function": {
            "calculation": {
              "domain": [[0.0, 1.0], [0.0, 1.0]],
              "range": [[0.0, 1.0], [0.0, 1.0], [0.0, 1.0]],
              "program": [
                2, "copy", 8.0, "mul", "floor",
                "exch", 8.0, "mul", "floor",
                "add", "cvi", 2, "mod", 0, "ne",
                3, 1, "roll",
                0.2, 4, 3, "roll",
                [
                  0.45, "mul", 3, 1, "roll",
                  0.45, "mul", 3, 1, "roll",
                  0.45, "mul", 3, 1, "roll"
                ],
                "if"
              ]
            }
          }
        }
      }
    }
  ],
  "items": [
    {
      "type": "text",
      "rect": {
        "llx": 70.0,
        "lly": 770.0,
        "urx": 525.0,
        "ury": 791.6
      },
      "content": [
        "Gradients, and a colour read from a function"
      ],
      "font": "DejaVuSans",
      "font_size": 18.0
    },
    {
      "type": "rect",
      "rect": {
        "llx": 70.0,
        "lly": 560.0,
        "urx": 280.0,
        "ury": 730.0
      },
      "fill": {
        "shading": "horizontal"
      }
    },
    {
      "type": "text",
      "rect": {
        "llx": 70.0,
        "lly": 545.0,
        "urx": 280.0,
        "ury": 557.0
      },
      "content": [
        "Axial, two colours"
      ],
      "font": "DejaVuSans",
      "font_size": 10.0
    },
    {
      "type": "rect",
      "rect": {
        "llx": 315.0,
        "lly": 560.0,
        "urx": 525.0,
        "ury": 730.0
      },
      "fill": {
        "shading": "diagonal"
      }
    },
    {
      "type": "text",
      "rect": {
        "llx": 315.0,
        "lly": 545.0,
        "urx": 525.0,
        "ury": 557.0
      },
      "content": [
        "Axial, on the diagonal"
      ],
      "font": "DejaVuSans",
      "font_size": 10.0
    },
    {
      "type": "rect",
      "rect": {
        "llx": 70.0,
        "lly": 320.0,
        "urx": 280.0,
        "ury": 490.0
      },
      "fill": {
        "shading": "radial"
      }
    },
    {
      "type": "text",
      "rect": {
        "llx": 70.0,
        "lly": 305.0,
        "urx": 280.0,
        "ury": 317.0
      },
      "content": [
        "Radial, outer extended"
      ],
      "font": "DejaVuSans",
      "font_size": 10.0
    },
    {
      "type": "rect",
      "rect": {
        "llx": 315.0,
        "lly": 320.0,
        "urx": 525.0,
        "ury": 490.0
      },
      "fill": {
        "shading": "three_stops"
      }
    },
    {
      "type": "text",
      "rect": {
        "llx": 315.0,
        "lly": 305.0,
        "urx": 525.0,
        "ury": 317.0
      },
      "content": [
        "Axial, three stops"
      ],
      "font": "DejaVuSans",
      "font_size": 10.0
    },
    {
      "type": "rect",
      "rect": {
        "llx": 70.0,
        "lly": 100.0,
        "urx": 280.0,
        "ury": 270.0
      },
      "fill": {
        "shading": "checkerboard"
      }
    },
    {
      "type": "text",
      "rect": {
        "llx": 70.0,
        "lly": 85.0,
        "urx": 525.0,
        "ury": 97.0
      },
      "content": [
        "Function-based: a checkerboard on x and y at once, anti-aliasing asked for"
      ],
      "font": "DejaVuSans",
      "font_size": 10.0
    }
  ]
}
