3
edits
Timomernick (talk | contribs) |
|||
Line 130: | Line 130: | ||
== Bridging QuickDraw and CoreGraphics == | == Bridging QuickDraw and CoreGraphics == | ||
You might be asking yourself, "Great... So now I can make a plugin that draws using CoreGraphics, but it will only run in browsers that support this NPAPI extension? | You might be asking yourself, "Great... So now I can make a plugin that draws using CoreGraphics, but it will only run in browsers that support this NPAPI extension?" | ||
Don't worry! There is a way for plugins to draw using CoreGraphics, yet remain compatible with QuickDraw-only browsers. The idea is to use QDBeginCGContext() and QDEndCGContext() to obtain a CGContextRef for the CGrafPtr provided by the browser. We will be shipping some sample code to demonstrate this technique, but here is a little snippet for your enjoyment: | Don't worry! There is a way for plugins to draw using CoreGraphics, yet remain compatible with QuickDraw-only browsers. The idea is to use QDBeginCGContext() and QDEndCGContext() to obtain a CGContextRef for the CGrafPtr provided by the browser. We will be shipping some sample code to demonstrate this technique, but here is a little snippet for your enjoyment: |
edits