

Shadows in Quartz are part of the graphics state. Figure 7-2 A shadow with no blur and another with a soft edge How Shadows Work

This chapter describes how shadows work and shows how to use the Quartz 2D API to create them. Figure 7-1 A shadowĪn x-offset, which specifies how far in the horizontal direction the shadow is offset from the image.Ī y-offset, which specifies how far in the vertical direction the shadow is offset from the image.Ī blur value, which specifies whether the image has a hard edge, as seen in the left side of Figure 7-2, or a diffuse edge, as seen in the right side of the figure.

Shadows can make an image appear three dimensional or as if it’s floating. A shadow is an image painted underneath, and offset from, a graphics object such that the shadow mimics the effect of a light source cast on the graphics object, as shown in Figure 7-1.
