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

Unified 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, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/c/pp_point.h ('k') | ppapi/c/pp_size.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/c/pp_rect.h
===================================================================
--- ppapi/c/pp_rect.h (revision 73626)
+++ ppapi/c/pp_rect.h (working copy)
@@ -7,7 +7,7 @@
/**
* @file
- * Defines the API ...
+ * This file defines the APIs for creating a 2 dimensional rectangle.
*/
#include "ppapi/c/pp_macros.h"
@@ -19,8 +19,19 @@
* @addtogroup Structs
* @{
*/
+
+/**
+ * The PP_Rect struct contains the size and location of a 2D rectangle.
+ */
struct PP_Rect {
+
+ /**
+ * 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.
+ * rectangle.
+ */
struct PP_Point point;
+
+ /** This value represents the width and height of the rectangle. */
struct PP_Size size;
};
PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_Rect, 16);
@@ -32,6 +43,18 @@
* @addtogroup Functions
* @{
*/
+
+/**
+ * PP_MakeRectFromXYWH() creates a PP_Rect given x and y coordinates and width
+ * and height dimensions as int32_t values.
+ * @param[in] x An int32_t value representing a horizontal coordinate of a
+ * point, starting with 0 as the left-most coordinate.
+ * @param[in] y An int32_t value representing a vertical coordinate of a point,
+ * starting with 0 as the top-most coordinate.
+ * @param[in] w An int32_t value representing a width.
+ * @param[in] h An int32_t value representing a height.
+ * @return A PP_Rect structure.
+ */
PP_INLINE struct PP_Rect PP_MakeRectFromXYWH(int32_t x, int32_t y,
int32_t w, int32_t h) {
struct PP_Rect ret;
« 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