Pepper_31_C_interfaces
|
#include <ppb_graphics_2d_dev.h>
Public Attributes | |
PP_Bool(* | SetScale )(PP_Resource resource, float scale) |
float(* | GetScale )(PP_Resource resource) |
Definition at line 29 of file ppb_graphics_2d_dev.h.
float(* PPB_Graphics2D_Dev_0_1::GetScale)(PP_Resource resource) |
Definition at line 57 of file ppb_graphics_2d_dev.h.
PP_Bool(* PPB_Graphics2D_Dev_0_1::SetScale)(PP_Resource resource, float scale) |
SetScale() sets the scale factor that will be applied when painting the graphics context onto the output device. Typically, if rendering at device resolution is desired, the context would be created with the width and height scaled up by the view's GetDeviceScale and SetScale called with a scale of 1.0 / GetDeviceScale(). For example, if the view resource passed to DidChangeView has a rectangle of (w=200, h=100) and a device scale of 2.0, one would call Create with a size of (w=400, h=200) and then call SetScale with 0.5. One would then treat each pixel in the context as a single device pixel.
[in] | resource | A Graphics2D context resource. |
[in] | scale | The scale to apply when painting. |
PP_TRUE
on success or PP_FALSE
if the resource is invalid or the scale factor is 0 or less. Definition at line 47 of file ppb_graphics_2d_dev.h.