Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 5. Rendering

Chapter 5. Rendering

One of the strengths of the 2D API is that shapes, text, and images can be manipulated in many of the same ways. In this chapter, I'll talk about the four parts of the rendering pipeline that apply to every graphics object:


transforming

Any graphics object can be transformed as it is rendered. A transformation can include translation, rotation, scaling, or shearing, or a combination of all four.


compositing

The process of putting pieces of a picture together is called compositing. The 2D API supports a handful of compositing rules and allows pieces of a picture to be partly or fully transparent.


clipping

Sometimes you don't want to draw outside a certain area, as though you were drawing only the part of a picture that's visible through a door frame. This operation is called clipping. The 2D API allows you to specify any Shape as a clipping path.


rendering hints

Antialiasing is a technique that is used to smooth out the rough edges ("jaggies") of a picture. The 2D rendering engine supports antialiasing and other speed and quality tradeoffs through a mechanism called rendering hints.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint