diff options
Diffstat (limited to 'ppapi/c/dev/ppb_graphics_2d_dev.h')
-rw-r--r-- | ppapi/c/dev/ppb_graphics_2d_dev.h | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/ppapi/c/dev/ppb_graphics_2d_dev.h b/ppapi/c/dev/ppb_graphics_2d_dev.h index a4661215..789b6aa 100644 --- a/ppapi/c/dev/ppb_graphics_2d_dev.h +++ b/ppapi/c/dev/ppb_graphics_2d_dev.h @@ -3,18 +3,20 @@ * found in the LICENSE file. */ -/* From dev/ppb_graphics_2d_dev.idl modified Tue Jun 19 14:11:08 2012. */ +/* From dev/ppb_graphics_2d_dev.idl modified Wed Nov 6 16:07:44 2013. */ #ifndef PPAPI_C_DEV_PPB_GRAPHICS_2D_DEV_H_ #define PPAPI_C_DEV_PPB_GRAPHICS_2D_DEV_H_ #include "ppapi/c/pp_bool.h" #include "ppapi/c/pp_macros.h" +#include "ppapi/c/pp_point.h" #include "ppapi/c/pp_resource.h" #include "ppapi/c/pp_stdint.h" #define PPB_GRAPHICS2D_DEV_INTERFACE_0_1 "PPB_Graphics2D(Dev);0.1" -#define PPB_GRAPHICS2D_DEV_INTERFACE PPB_GRAPHICS2D_DEV_INTERFACE_0_1 +#define PPB_GRAPHICS2D_DEV_INTERFACE_0_2 "PPB_Graphics2D(Dev);0.2" +#define PPB_GRAPHICS2D_DEV_INTERFACE PPB_GRAPHICS2D_DEV_INTERFACE_0_2 /** * @file @@ -26,7 +28,7 @@ * @{ */ /* PPB_Graphics2D_Dev interface */ -struct PPB_Graphics2D_Dev_0_1 { +struct PPB_Graphics2D_Dev_0_2 { /** * SetScale() sets the scale factor that will be applied when painting the * graphics context onto the output device. Typically, if rendering at device @@ -55,9 +57,23 @@ struct PPB_Graphics2D_Dev_0_1 { * is not a valid <code>Graphics2D</code> context, this will return 0.0. */ float (*GetScale)(PP_Resource resource); + /*** + * Sets the offset into the plugin element at which the graphics context is + * painted. This allows a portion of the plugin element to be painted to. + * The new offset will only be applied after Flush() has been called. + * + * @param[in] resource A <code>Graphics2D</code> context resource. + * @param[in] offset The offset at which the context should be painted. + */ + void (*SetOffset)(PP_Resource resource, const struct PP_Point* offset); }; -typedef struct PPB_Graphics2D_Dev_0_1 PPB_Graphics2D_Dev; +typedef struct PPB_Graphics2D_Dev_0_2 PPB_Graphics2D_Dev; + +struct PPB_Graphics2D_Dev_0_1 { + PP_Bool (*SetScale)(PP_Resource resource, float scale); + float (*GetScale)(PP_Resource resource); +}; /** * @} */ |