202
edits
BrettWilson (talk | contribs) (Add 2D rendering details) |
BrettWilson (talk | contribs) (2D device example) |
||
Line 250: | Line 250: | ||
} NPDeviceContext2D;</pre> | } NPDeviceContext2D;</pre> | ||
=== | ==== 2D Device Example ==== | ||
<pre>/* Get the 2D device function pointers. */ | |||
<pre> | NPDevice* device2d = extensions->acquireDevice(npp, NPPepper2DDevice); | ||
/* Create a context. there are currently no options | |||
in the 2D device to configure */ | |||
NPDeviceContext2DConfig config; | |||
NPDeviceContext2D context; | |||
device2d->initializeContext(npp, &config, &context); | |||
/* Draw into the bits in context->region however you want. */ | |||
device2d->flushContext(npp, &context);</pre> | |||
=== NPP_SetWindow and Windowless Plugins === | === NPP_SetWindow and Windowless Plugins === |
edits