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

Side by Side Diff: ppapi/c/pp_rect.h

Issue 6312098: Updating documentation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 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 | « ppapi/c/pp_point.h ('k') | ppapi/c/pp_size.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 /* Copyright (c) 2010 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_C_PP_RECT_H_ 5 #ifndef PPAPI_C_PP_RECT_H_
6 #define PPAPI_C_PP_RECT_H_ 6 #define PPAPI_C_PP_RECT_H_
7 7
8 /** 8 /**
9 * @file 9 * @file
10 * Defines the API ... 10 * This file defines the APIs for creating a 2 dimensional rectangle.
11 */ 11 */
12 12
13 #include "ppapi/c/pp_macros.h" 13 #include "ppapi/c/pp_macros.h"
14 #include "ppapi/c/pp_point.h" 14 #include "ppapi/c/pp_point.h"
15 #include "ppapi/c/pp_size.h" 15 #include "ppapi/c/pp_size.h"
16 #include "ppapi/c/pp_stdint.h" 16 #include "ppapi/c/pp_stdint.h"
17 17
18 /** 18 /**
19 * @addtogroup Structs 19 * @addtogroup Structs
20 * @{ 20 * @{
21 */ 21 */
22
23 /**
24 * The PP_Rect struct contains the size and location of a 2D rectangle.
25 */
22 struct PP_Rect { 26 struct PP_Rect {
27
28 /**
29 * This value represents the x and y coordinates of upper-left corner of the
dmichael(do not use this one) 2011/02/03 18:15:11 'of upper-left' -> 'of the upper-left'
jond 2011/02/03 20:58:14 Done.
30 * rectangle.
31 */
23 struct PP_Point point; 32 struct PP_Point point;
33
34 /** This value represents the width and height of the rectangle. */
24 struct PP_Size size; 35 struct PP_Size size;
25 }; 36 };
26 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_Rect, 16); 37 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_Rect, 16);
27 /** 38 /**
28 * @} 39 * @}
29 */ 40 */
30 41
31 /** 42 /**
32 * @addtogroup Functions 43 * @addtogroup Functions
33 * @{ 44 * @{
34 */ 45 */
46
47 /**
48 * PP_MakeRectFromXYWH() creates a PP_Rect given x and y coordinates and width
49 * and height dimensions as int32_t values.
50 * @param[in] x An int32_t value representing a horizontal coordinate of a
51 * point, starting with 0 as the left-most coordinate.
52 * @param[in] y An int32_t value representing a vertical coordinate of a point,
53 * starting with 0 as the top-most coordinate.
54 * @param[in] w An int32_t value representing a width.
55 * @param[in] h An int32_t value representing a height.
56 * @return A PP_Rect structure.
57 */
35 PP_INLINE struct PP_Rect PP_MakeRectFromXYWH(int32_t x, int32_t y, 58 PP_INLINE struct PP_Rect PP_MakeRectFromXYWH(int32_t x, int32_t y,
36 int32_t w, int32_t h) { 59 int32_t w, int32_t h) {
37 struct PP_Rect ret; 60 struct PP_Rect ret;
38 ret.point.x = x; 61 ret.point.x = x;
39 ret.point.y = y; 62 ret.point.y = y;
40 ret.size.width = w; 63 ret.size.width = w;
41 ret.size.height = h; 64 ret.size.height = h;
42 return ret; 65 return ret;
43 } 66 }
44 /** 67 /**
45 * @} 68 * @}
46 */ 69 */
47 #endif /* PPAPI_C_PP_RECT_H_ */ 70 #endif /* PPAPI_C_PP_RECT_H_ */
48 71
OLDNEW
« no previous file with comments | « ppapi/c/pp_point.h ('k') | ppapi/c/pp_size.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698