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] |
| 12 |
11 label Chrome { | 13 label Chrome { |
12 M14 = 1.0, | 14 M14 = 1.0, |
13 M27 = 1.1 | 15 M27 = 1.1 |
14 }; | 16 }; |
15 | 17 |
16 /** | 18 /** |
17 * <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. |
18 */ | 20 */ |
19 [macro="PPB_GRAPHICS_2D_INTERFACE"] | 21 [macro="PPB_GRAPHICS_2D_INTERFACE"] |
20 interface PPB_Graphics2D { | 22 interface PPB_Graphics2D { |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 * | 66 * |
65 * @param[in] resource The 2D Graphics resource. | 67 * @param[in] resource The 2D Graphics resource. |
66 * @param[in,out] size The size of the 2D graphics context in the browser. | 68 * @param[in,out] size The size of the 2D graphics context in the browser. |
67 * @param[in,out] is_always_opaque Identifies whether only opaque data | 69 * @param[in,out] is_always_opaque Identifies whether only opaque data |
68 * will be painted. | 70 * will be painted. |
69 * | 71 * |
70 * @return Returns <code>PP_TRUE</code> on success or <code>PP_FALSE</code> if | 72 * @return Returns <code>PP_TRUE</code> on success or <code>PP_FALSE</code> if |
71 * the resource is invalid. The output parameters will be set to 0 on a | 73 * the resource is invalid. The output parameters will be set to 0 on a |
72 * <code>PP_FALSE</code>. | 74 * <code>PP_FALSE</code>. |
73 */ | 75 */ |
| 76 [always_set_output_parameters] |
74 PP_Bool Describe( | 77 PP_Bool Describe( |
75 [in] PP_Resource graphics_2d, | 78 [in] PP_Resource graphics_2d, |
76 [out] PP_Size size, | 79 [out] PP_Size size, |
77 [out] PP_Bool is_always_opqaue); | 80 [out] PP_Bool is_always_opaque); |
78 | 81 |
79 /** | 82 /** |
80 * PaintImageData() enqueues a paint of the given image into the context. | 83 * PaintImageData() enqueues a paint of the given image into the context. |
81 * This function has no effect until you call Flush() As a result, what | 84 * This function has no effect until you call Flush() As a result, what |
82 * counts is the contents of the bitmap when you call Flush(), not when | 85 * counts is the contents of the bitmap when you call Flush(), not when |
83 * you call this function. | 86 * you call this function. |
84 * | 87 * |
85 * The provided image will be placed at <code>top_left</code> from the top | 88 * The provided image will be placed at <code>top_left</code> from the top |
86 * left of the context's internal backing store. Then the pixels contained | 89 * left of the context's internal backing store. Then the pixels contained |
87 * in <code>src_rect</code> will be copied into the backing store. This | 90 * in <code>src_rect</code> will be copied into the backing store. This |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 * | 277 * |
275 * @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 |
276 * 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. |
277 */ | 280 */ |
278 [version=1.1] | 281 [version=1.1] |
279 float_t GetScale( | 282 float_t GetScale( |
280 [in] PP_Resource resource); | 283 [in] PP_Resource resource); |
281 | 284 |
282 }; | 285 }; |
283 | 286 |
OLD | NEW |