![]() ![]() After this call, graphics state parameters remain unchanged except for alpha (which is set to 1), shadow (which is turned off), blend mode (which is set to normal), and other parameters that affect the final composite.Īfter you begin a transparency layer, you perform whatever drawing you want to appear in that layer. The dictionary lets you provide options to specify additional information about the layer, but because the dictionary is not yet used by the Quartz 2D API, you pass NULL. You signal the start of a transparency layer by calling the function CGContextBeginTransparencyLayer, which takes as parameters a graphics context and a CFDictionary object. But because layers are always part of a stack, you can’t manipulate them independently. Quartz maintains a transparency layer stack for each context and transparency layers can be nested. Quartz transparency layers are similar to layers available in many popular graphics applications. Figure 9-2 Three circles painted as separate entities How Transparency Layers Work If you apply a shadow to the three circles in Figure 9-1 without first rendering them to a transparency layer, you get the result shown in Figure 9-2. Figure 9-1 Three circles as a composite in a transparency layer Transparency layers are useful when you want to apply an effect to a group of objects, such as the shadow applied to the three circles in Figure 9-1. The resulting composite is treated as a single object. ![]() ![]() A transparency layer consists of two or more objects that are combined to yield a composite graphic. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |