Confirmed users, Bureaucrats and Sysops emeriti
1,680
edits
No edit summary |
No edit summary |
||
Line 37: | Line 37: | ||
= Event Structure = | = Event Structure = | ||
= | typedef enum { | ||
NPImageFormatARGB32 = 0, /* a8r8g8b8 */ | |||
NPImageFormatRGB24 = 2, /* x8r8g8b8 */ | |||
NPImageFormatRGB16_565 = 3 /* r5g6b5 */ | |||
... | |||
} NPImageFormat; | |||
typedef struct _NPImageData | |||
{ | |||
/* Image data parameters */ | |||
char* data; /* image pointer */ | |||
int32_t stride; /* Stride of data image pointer */ | |||
NPImageFormat format; /* Format of image pointer */ | |||
NPSize dataSize; /* Data buffer size */ | |||
/* Clip rectangle, must be used for trusted plugins */ | |||
int32_t x; /* Expose x relative to 0,0 of plugin window area*/ | |||
int32_t y; /* Expose y relative to 0,0 of plugin window area */ | |||
uint32_t width; /* Expose width */ | |||
uint32_t height; /* Expose height */ | |||
/* Position and scale values for plugin area */ | |||
float translateX; /* translate X matrix value, (x offset) */ | |||
float translateY; /* translate Y matrix value, (y offset) */ | |||
/* Defines plugin window size on scaled context, if 1 then size = window size */ | |||
float scaleX; /* scale X matrix value */ | |||
float scaleY; /* scale Y matrix value */ | |||
} NPImageData; | |||
= NPImageFormat type negotiation = | |||
<pre> | <pre> |