Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
You can use two kinds of gradients to fill your shapes: LinearGradients and RadialGradients. LinearGradients are gradients that fill in a straight line from one side of a shape to the opposite side. RadialGradients start the gradient at one point, and the gradient radiates out from that point to fill the shape.
In the section that follows you learn how to apply a LinearGradient to a rectangle.