NPAPI:DrawImage: Difference between revisions

Line 78: Line 78:


* NPNVsupportedImageFormats (NPNVariable = 19)
* NPNVsupportedImageFormats (NPNVariable = 19)
* NPPVpluginImageFormat (NPPVariable = 22)
* NPPVpluginImageFormats (NPPVariable = 22)


Negotiating the image format will work similarly to [[NPAPI:Models|drawing and event model negotiation]], but the value of NPNVsupportedImageFormats will be a bitmap of supported types. Based on the browser's supported formats, the plugin should select a subset which it can handle. The format for any given event will be specified in the event, and will be from the plugin's supported subset.
Negotiating the image format will work similarly to [[NPAPI:Models|drawing and event model negotiation]], but the value of NPNVsupportedImageFormats will be a bitmap of supported types. Based on the browser's supported formats, the plugin should select a subset which it can handle. The format for any given event will be specified in the event, and will be from the plugin's supported subset.
Line 85: Line 85:
   browserFuncs->getvalue(instance, NPNVsupportedImageFormats, &supportedFormats);
   browserFuncs->getvalue(instance, NPNVsupportedImageFormats, &supportedFormats);
   ...
   ...
   browserFuncs->setvalue(instance, NPPVImageFormat, (void*)supportedSubset);
   browserFuncs->setvalue(instance, NPPVImageFormats, (void*)supportedSubset);
Confirmed users
180

edits