RadialGradient

Constructor

RadialGradient <id> (double cx, double cy, double r, double fx, double fy, int fill_spread, int fill_coords) { <gradient_stop_list> }

fill_spread:
  • 0 - pad
  • 1 - repeat
  • 2 - reflect
fill_coords:
  • 0 - rendering coordinates
  • 1 - local coordinates

Action

Defines a RadialGradient for the next graphic objects.

Predefined children

cx, cy, r, fx, fy, spread, coords.

Example


use core
use gui

_main_
Component root {
  Frame f ("myFrame", 0, 0, 400, 400)
  RadialGradient rg (200, 200, 100, 0, 0, 0, 0) {
    GradientStop _(0, 0, 0, 1, 0)
    GradientStop _( 250, 250, 250, 1, 1)
  }
  Rectangle r (100, 100, 200, 200, 0.5, 0.5)
}

run root
run syshook