NPAPI:CoreGraphicsDrawing: Difference between revisions

Jump to navigation Jump to search
Line 91: Line 91:
- NPWindow's 'window' field becomes a NP_CGContext:
- NPWindow's 'window' field becomes a NP_CGContext:


/*
/* NP_CGContext is the type of the NPWindow's 'window' when the
* NP_CGContext is the type of the NPWindow's 'window' when the plugin specifies NPDrawingModelCoreGraphics
  * plugin specifies NPDrawingModelCoreGraphics as its drawing model.
* as its drawing model.
  */
*/
typedef struct NP_CGContext
 
{
typedef struct NP_CGContext
    CGContextRef context;
{
    WindowRef window;
    CGContextRef context;
} NP_CGContext;
    WindowRef window;
} NP_CGContext;


- NPRegion becomes a CGPathRef instead of a RgnHandle:
- NPRegion becomes a CGPathRef instead of a RgnHandle:


#if defined(XP_MAC)
#if defined(XP_MAC)
typedef RgnHandle NPRegion;
typedef RgnHandle NPRegion;
#elif defined(XP_MACOSX)
#elif defined(XP_MACOSX)
/*
/* NPRegion's type depends on the drawing model specified by the plugin
* NPRegion's type depends on the drawing model specified by the plugin (see NPNVpluginDrawingModel).
  * (see NPNVpluginDrawingModel).
* NPQDRegion represents a QuickDraw RgnHandle, and NPCGRegion represents a CoreGraphics CGPathRef.
  * NPQDRegion represents a QuickDraw RgnHandle, and NPCGRegion represents
*/
  * a CoreGraphics CGPathRef.
typedef void *NPRegion;
  */
#ifndef NP_NO_QUICKDRAW
typedef void *NPRegion;
typedef RgnHandle NPQDRegion;
#ifndef NP_NO_QUICKDRAW
#endif
typedef RgnHandle NPQDRegion;
typedef CGPathRef NPCGRegion;
#endif
#endif /* XP_MAC */
typedef CGPathRef NPCGRegion;
#endif /* XP_MAC */


== Optimized drawing ==
== Optimized drawing ==
Confirmed users, Bureaucrats and Sysops emeriti
1,680

edits

Navigation menu