Graphics Programs Reference
In-Depth Information
This defines an axial shading pattern. We have named our pattern /GradientShading .
The pattern type for shadings is 2 . Our shading is defined by:
• The color space /DeviceGray
• The shading type 2 (Axial)
• The coordinates of the start and end of the shading: (150, 200) and (450, 500)
We don't discuss the /Extend or /Function entries here. The pattern is now invoked,
and a shape drawn:
/Pattern cs Choose pattern color space for fills
/GradientShading scn Choose our pattern as a color
250 300 m 350 400 450 500 550 300 c
450 300 350 250 y h f
The result is Figure 5-12 .
Figure 5-12. An axial shading pattern
If we change to a radial shading by changing the /ShadingType to 3 , and change
the /Coords entry to [400 400 0 400 400 200] —a radial shading with inner radius 0
and outer radius 200 both centered on (400, 400):
 
Search WWH ::




Custom Search