OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef PPAPI_CPP_GRAPHICS_2D_H_ | 5 #ifndef PPAPI_CPP_GRAPHICS_2D_H_ |
6 #define PPAPI_CPP_GRAPHICS_2D_H_ | 6 #define PPAPI_CPP_GRAPHICS_2D_H_ |
7 | 7 |
8 #include "ppapi/c/pp_stdint.h" | 8 #include "ppapi/c/pp_stdint.h" |
9 #include "ppapi/cpp/resource.h" | 9 #include "ppapi/cpp/resource.h" |
10 #include "ppapi/cpp/size.h" | 10 #include "ppapi/cpp/size.h" |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 | 101 |
102 /// PaintImageData() enqueues a paint command of the given image into | 102 /// PaintImageData() enqueues a paint command of the given image into |
103 /// the context. This command has no effect until you call Flush(). As a | 103 /// the context. This command has no effect until you call Flush(). As a |
104 /// result, what counts is the contents of the bitmap when you call Flush(), | 104 /// result, what counts is the contents of the bitmap when you call Flush(), |
105 /// not when you call this function. | 105 /// not when you call this function. |
106 /// | 106 /// |
107 /// The provided image will be placed at <code>top_left</code> from the top | 107 /// The provided image will be placed at <code>top_left</code> from the top |
108 /// left of the context's internal backing store. Then the pixels contained | 108 /// left of the context's internal backing store. Then the pixels contained |
109 /// in <code>src_rect</code> will be copied into the backing store. This | 109 /// in <code>src_rect</code> will be copied into the backing store. This |
110 /// means that the rectangle being painted will be at <code>src_rect</code> | 110 /// means that the rectangle being painted will be at <code>src_rect</code> |
111 /// offset by <code>top_left/code>. | 111 /// offset by <code>top_left</code>. |
112 /// | 112 /// |
113 /// The <code>src_rect/code> is specified in the coordinate system of the | 113 /// The <code>src_rect</code> is specified in the coordinate system of the |
114 /// image being painted, not the context. For the common case of copying the | 114 /// image being painted, not the context. For the common case of copying the |
115 /// entire image, you may specify an empty <code>src_rect</code>. | 115 /// entire image, you may specify an empty <code>src_rect</code>. |
116 /// | 116 /// |
117 /// The painted area of the source bitmap must fall entirely within the | 117 /// The painted area of the source bitmap must fall entirely within the |
118 /// context. Attempting to paint outside of the context will result in an | 118 /// context. Attempting to paint outside of the context will result in an |
119 /// error. However, the source bitmap may fall outside the context, as long | 119 /// error. However, the source bitmap may fall outside the context, as long |
120 /// as the <code>src_rect</code> subset of it falls entirely within the | 120 /// as the <code>src_rect</code> subset of it falls entirely within the |
121 /// context. | 121 /// context. |
122 /// | 122 /// |
123 /// There are two methods most modules will use for painting. The first | 123 /// There are two methods most modules will use for painting. The first |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 // for it. | 254 // for it. |
255 int32_t Flush(const CompletionCallback& cc); | 255 int32_t Flush(const CompletionCallback& cc); |
256 | 256 |
257 private: | 257 private: |
258 Size size_; | 258 Size size_; |
259 }; | 259 }; |
260 | 260 |
261 } // namespace pp | 261 } // namespace pp |
262 | 262 |
263 #endif // PPAPI_CPP_GRAPHICS_2D_H_ | 263 #endif // PPAPI_CPP_GRAPHICS_2D_H_ |
OLD | NEW |