OLD | NEW |
---|---|
1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 * Use of this source code is governed by a BSD-style license that can be |
3 * found in the LICENSE file. | 3 * found in the LICENSE file. |
4 */ | 4 */ |
5 | 5 |
6 /** | 6 /** |
7 * Defines the <code>PPB_Graphics2D</code> struct representing a 2D graphics | 7 * Defines the <code>PPB_Graphics2D</code> struct representing a 2D graphics |
8 * context within the browser. | 8 * context within the browser. |
9 */ | 9 */ |
10 | 10 |
11 [generate_thunk] | 11 [generate_thunk] |
12 | 12 |
13 label Chrome { | 13 label Chrome { |
14 M14 = 1.0, | 14 M14 = 1.0, |
15 M27 = 1.1 | 15 M27 = 1.1 |
piman
2016/04/15 19:24:39
I believe you need to add a version here, M52 I be
alessandroa
2016/04/21 15:39:22
Done.
| |
16 }; | 16 }; |
17 | 17 |
18 /** | 18 /** |
19 * <code>PPB_Graphics2D</code> defines the interface for a 2D graphics context. | 19 * <code>PPB_Graphics2D</code> defines the interface for a 2D graphics context. |
20 */ | 20 */ |
21 [macro="PPB_GRAPHICS_2D_INTERFACE"] | 21 [macro="PPB_GRAPHICS_2D_INTERFACE"] |
22 interface PPB_Graphics2D { | 22 interface PPB_Graphics2D { |
23 /** | 23 /** |
24 * Create() creates a 2D graphics context. The returned graphics context will | 24 * Create() creates a 2D graphics context. The returned graphics context will |
25 * not be bound to the module instance on creation (call BindGraphics() on | 25 * not be bound to the module instance on creation (call BindGraphics() on |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
275 * | 275 * |
276 * @param[in] resource A <code>Graphics2D</code> context resource. | 276 * @param[in] resource A <code>Graphics2D</code> context resource. |
277 * | 277 * |
278 * @return Returns the scale factor for the graphics context. If the resource | 278 * @return Returns the scale factor for the graphics context. If the resource |
279 * is not a valid <code>Graphics2D</code> context, this will return 0.0. | 279 * is not a valid <code>Graphics2D</code> context, this will return 0.0. |
280 */ | 280 */ |
281 [version=1.1] | 281 [version=1.1] |
282 float_t GetScale( | 282 float_t GetScale( |
283 [in] PP_Resource resource); | 283 [in] PP_Resource resource); |
284 | 284 |
285 /** | |
286 * SetLayerTransform() sets a transformation factor that will be applied for | |
287 * the current graphics context displayed on the output device. If both | |
288 * SetScale and SetLayerTransform will be used, they are going to get combined | |
289 * for the final result. | |
290 * This function has no effect until you call Flush(). | |
291 * @param[in] scale The scale to be applied. | |
292 * @param[in] origin The origin of the scale. | |
293 * @param[in] translate The translation to be applied. | |
294 * | |
295 * @return Returns <code>true</code> on success or <code>false</code> | |
piman
2016/04/15 19:24:39
nit: PP_TRUE, PP_FALSE instead of true, false.
alessandroa
2016/04/21 15:39:22
Done.
| |
296 * if the resource is invalid or the scale factor is 0 or less. | |
297 */ | |
298 [version=1.2] | |
299 PP_Bool SetLayerTransform( | |
300 [in] PP_Resource resource, | |
301 [in] float_t scale, | |
302 [in] PP_Point origin, | |
303 [in] PP_Point translate); | |
285 }; | 304 }; |
286 | 305 |
OLD | NEW |