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

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
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 /** This value represents the upper left corner of the rectangle. */
dmichael(do not use this one) 2011/02/03 17:42:00 Sorry, I think I meant 'the x and y coordinates of
jond 2011/02/03 18:03:14 Done.
jond 2011/02/03 18:03:14 Done.
23 struct PP_Point point; 29 struct PP_Point point;
30
31 /** This value represents the width and height of the rectangle. */
24 struct PP_Size size; 32 struct PP_Size size;
25 }; 33 };
26 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_Rect, 16); 34 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_Rect, 16);
27 /** 35 /**
28 * @} 36 * @}
29 */ 37 */
30 38
31 /** 39 /**
32 * @addtogroup Functions 40 * @addtogroup Functions
33 * @{ 41 * @{
34 */ 42 */
43
44 /**
45 * PP_MakeRectFromXYWH() creates a PP_Rect given x and y coordinates and w
46 * and h dimensions as int32_t values.
dmichael(do not use this one) 2011/02/03 17:42:00 w->width h->height
jond 2011/02/03 18:03:14 Done.
47 * @param[in] x An int32_t value representing a horizontal coordinate of a
48 * point, starting with 0 as the left-most coordinate.
49 * @param[in] y An int32_t value representing a vertical coordinate of a point,
50 * starting with 0 as the top-most coordinate.
51 * @param[in] w An int32_t value representing a width.
52 * @param[in] h An int32_t value representing a height.
53 * @return A PP_Rect structure.
54 */
35 PP_INLINE struct PP_Rect PP_MakeRectFromXYWH(int32_t x, int32_t y, 55 PP_INLINE struct PP_Rect PP_MakeRectFromXYWH(int32_t x, int32_t y,
36 int32_t w, int32_t h) { 56 int32_t w, int32_t h) {
37 struct PP_Rect ret; 57 struct PP_Rect ret;
38 ret.point.x = x; 58 ret.point.x = x;
39 ret.point.y = y; 59 ret.point.y = y;
40 ret.size.width = w; 60 ret.size.width = w;
41 ret.size.height = h; 61 ret.size.height = h;
42 return ret; 62 return ret;
43 } 63 }
44 /** 64 /**
45 * @} 65 * @}
46 */ 66 */
47 #endif /* PPAPI_C_PP_RECT_H_ */ 67 #endif /* PPAPI_C_PP_RECT_H_ */
48 68
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698