Chromium Code Reviews| Index: ppapi/api/dev/ppb_graphics_2d_dev.idl |
| diff --git a/ppapi/api/dev/ppb_graphics_2d_dev.idl b/ppapi/api/dev/ppb_graphics_2d_dev.idl |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..1d85c463ccab6c710dd33179ff7e4dd9c45a256c |
| --- /dev/null |
| +++ b/ppapi/api/dev/ppb_graphics_2d_dev.idl |
| @@ -0,0 +1,43 @@ |
| +/* Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| + * Use of this source code is governed by a BSD-style license that can be |
| + * found in the LICENSE file. |
| + */ |
| + |
| +/* This file contains the <code>PPB_Graphics2D_Dev</code> interface. */ |
| +label Chrome { |
| + M22 = 0.1 |
| +}; |
| + |
| +/* PPB_Graphics2D_Dev interface */ |
| +interface PPB_Graphics2D_Dev { |
| + /** |
| + * 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. |
| + * |
| + * @param[in] resource A <code>Graphics2D</code> context resource. |
| + * @param[in] scale The scale to apply when painting. |
| + * |
| + * @return Returns <code>PP_TRUE</code> on success or <code>PP_FALSE</code> if |
| + * the resource is invalid or the scale factor is 0 or less. |
| + */ |
| + PP_Bool SetScale( |
| + [in] PP_Resource resource, |
|
brettw
2012/06/19 18:28:21
Style nit: indent 2 more spaces (same below).
Josh Horwich
2012/06/19 23:56:15
Done.
|
| + [in] float_t scale); |
| + |
| + /*** |
| + * GetScale() gets the scale factor that will be applied when painting the |
| + * graphics context onto the output device. |
| + * |
| + * @param[in] resource A <code>Graphics2D</code> context resource. |
| + */ |
|
brettw
2012/06/19 18:28:21
This comment should specify the return value on in
Josh Horwich
2012/06/19 23:56:15
Done.
|
| + float_t GetScale( |
| + [in] PP_Resource resource); |
| +}; |
| + |