Java Reference
In-Depth Information
Stop {
offset: 0.5
color: Color.WHITE
},
Stop {
offset: 1.0
color: Color.PURPLE
},
]
}
a: [
Polygon {
points: [
10, 190,
85, 10,
160, 190
]
}
Ellipse {
centerX: 85, centerY: 190
radiusX: 75, radiusY: 20
}
]
}
}
}
}
RadialGradient
A LinearGradient can be employed to augment the appearance of a shape,
making it look more 3D-like. However, it is only effective for a certain class of
objects. For example, if you want to add some perspective to a circle to make it
look more sphere-like, using LinearGradient would likely not result in a very
realistic image. You could make use of the RadialGradient class. Rather than
filling shapes with linear patterns, a RadialGradient gives you a way to fill con-
tent with circular or radial patterns. Here's a segment of code demonstrating the
use of RadialGradient with a Circle node.
Circle {
centerX: 100, centerY: 60
radius: 50
fill: RadialGradient {
centerX: 125, centerY: 45,
radius: 50
proportional: false
Search WWH ::




Custom Search