Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(205)

Side by Side Diff: ppapi/api/dev/ppb_graphics_2d_dev.idl

Issue 10544168: Implement HiDPI support in Pepper dev interface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/test/ui/ppapi_uitest.cc ('k') | ppapi/api/dev/ppb_view_dev.idl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file.
4 */
5
6 /* This file contains the <code>PPB_Graphics2D_Dev</code> interface. */
7 label Chrome {
8 M22 = 0.1
9 };
10
11 /* PPB_Graphics2D_Dev interface */
12 interface PPB_Graphics2D_Dev {
13 /**
14 * SetScale() sets the scale factor that will be applied when painting the
15 * graphics context onto the output device. Typically, if rendering at device
16 * resolution is desired, the context would be created with the width and
17 * height scaled up by the view's GetDeviceScale and SetScale called with a
18 * scale of 1.0 / GetDeviceScale(). For example, if the view resource passed
19 * to DidChangeView has a rectangle of (w=200, h=100) and a device scale of
20 * 2.0, one would call Create with a size of (w=400, h=200) and then call
21 * SetScale with 0.5. One would then treat each pixel in the context as a
22 * single device pixel.
23 *
24 * @param[in] resource A <code>Graphics2D</code> context resource.
25 * @param[in] scale The scale to apply when painting.
26 *
27 * @return Returns <code>PP_TRUE</code> on success or <code>PP_FALSE</code> if
28 * the resource is invalid or the scale factor is 0 or less.
29 */
30 PP_Bool SetScale(
31 [in] PP_Resource resource,
32 [in] float_t scale);
33
34 /***
35 * GetScale() gets the scale factor that will be applied when painting the
36 * graphics context onto the output device.
37 *
38 * @param[in] resource A <code>Graphics2D</code> context resource.
39 *
40 * @return Returns the scale factor for the graphics context. If the resource
41 * is not a valid <code>Graphics2D</code> context, this will return 0.0.
42 */
43 float_t GetScale(
44 [in] PP_Resource resource);
45 };
46
OLDNEW
« no previous file with comments | « chrome/test/ui/ppapi_uitest.cc ('k') | ppapi/api/dev/ppb_view_dev.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698