• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Q&A

Q1:How does SVG's concept of masking and clipping differ from Flash's?
A1: Flash actually uses a mask to accomplish both masking and clipping. Rather than using two distinct methods, Flash's cropping style is determined by whether the mask is solid or transparent. If the mask's content is 100% opaque, the mask can serve the purpose of a clipping path.
Q2:Aside from the examples in this hour, what else can a mask or clipping path be used for?
A2: If you want to get creative, you can animate a mask or clipping path to produce an effect similar to the gun barrel view in the introduction to James Bond movies. Hour 15, “Animation,” will introduce you to the basics of animating objects. Rather than animating artwork, however, you could animate a mask or clipping path to move your “keyhole” without moving its contents. Conversely, you could animate your content within the mask or clipping path, creating a window to another world of sorts. This book's final example will illustrate such a possibility by having the clouds animate across the sky within their clipping path.
Q3:Do masks and clipping paths need to be continuous shapes?
A3: Absolutely not. You could, for instance, have your clipping path comprise the pegboard artwork you created in Listing 8.2, revealing content through its series of “portholes.” Both the mask and the clipPath elements serve as containers for any number of other elements, allowing multiple distinct shapes to define their content.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint