#include <graphics_2d_dev.h>
Definition at line 14 of file graphics_2d_dev.h.
pp::Graphics2D_Dev::Graphics2D_Dev |
( |
| ) |
|
|
inline |
pp::Graphics2D_Dev::Graphics2D_Dev |
( |
const Graphics2D & |
other | ) |
|
|
inline |
virtual pp::Graphics2D_Dev::~Graphics2D_Dev |
( |
| ) |
|
|
inlinevirtual |
float pp::Graphics2D_Dev::GetScale |
( |
| ) |
|
GetScale() gets the scale factor that will be applied when painting the graphics context onto the output device.
- Returns
- Returns the scale factor for the graphics context. If the resource is invalid, 0.0 will be returned.
bool pp::Graphics2D_Dev::SetScale |
( |
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] | scale | The scale to apply when painting. |
- Returns
- Returns
true
on success or false
if the resource is invalid or the scale factor is 0 or less.
static bool pp::Graphics2D_Dev::SupportsScale |
( |
| ) |
|
|
static |
Returns true if SetScale and GetScale are supported. False if not.
The documentation for this class was generated from the following file: