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
3 * found in the LICENSE file.
7 * This file defines the API to create a 2 dimensional point.
8 * 0,0 is the upper-left starting coordinate.
12 * The PP_Point structure defines the integer x and y coordinates of a point.
14 [assert_size
(8), returnByValue
]
17 * This value represents the horizontal coordinate of a point, starting with 0
18 * as the left-most coordinate.
23 * This value represents the vertical coordinate of a point, starting with 0
24 * as the top-most coordinate.
30 * The PP_FloatPoint structure defines the floating-point x and y coordinates
33 [assert_size
(8), returnByValue
]
34 struct PP_FloatPoint
{
41 * @addtogroup Functions
46 * PP_MakePoint() creates a <code>PP_Point</code> given the x and y coordinates
49 * @param[in] x An int32_t value representing a horizontal coordinate of a
50 * point, starting with 0 as the left-most coordinate.
51 * @param[in] y An int32_t value representing a vertical coordinate of a point,
52 * starting with 0 as the top-most coordinate.
54 * @return A <code>PP_Point</code> structure.
56 PP_INLINE
struct PP_Point PP_MakePoint
(int32_t x
, int32_t y
) {
63 PP_INLINE
struct PP_FloatPoint PP_MakeFloatPoint
(float x
, float y
) {
64 struct PP_FloatPoint ret
;