Pepper_31_C_interfaces
Public Attributes | List of all members
PPB_Graphics2D_Dev_0_1 Struct Reference

#include <ppb_graphics_2d_dev.h>

Collaboration diagram for PPB_Graphics2D_Dev_0_1:
Collaboration graph

Public Attributes

PP_Bool(* SetScale )(PP_Resource resource, float scale)
 
float(* GetScale )(PP_Resource resource)
 

Detailed Description

Definition at line 29 of file ppb_graphics_2d_dev.h.

Member Data Documentation

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.

Parameters
[in]resourceA Graphics2D context resource.
[in]scaleThe scale to apply when painting.
Returns
Returns 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.


The documentation for this struct was generated from the following file: