1 /***************************************************************************
2 * Copyright (c) 2024 Microsoft Corporation
3 *
4 * This program and the accompanying materials are made available under the
5 * terms of the MIT License which is available at
6 * https://opensource.org/licenses/MIT.
7 *
8 * SPDX-License-Identifier: MIT
9 **************************************************************************/
10
11
12 /**************************************************************************/
13 /**************************************************************************/
14 /** */
15 /** GUIX Component */
16 /** */
17 /** Utility (Utility) */
18 /** */
19 /**************************************************************************/
20
21 #define GX_SOURCE_CODE
22
23
24 /* Include necessary system files. */
25
26 #include "gx_api.h"
27 #include "gx_utility.h"
28
29 GX_CALLER_CHECKING_EXTERNS
30
31 /**************************************************************************/
32 /* */
33 /* FUNCTION RELEASE */
34 /* */
35 /* _gxe_utility_circle_point_get PORTABLE C */
36 /* 6.1 */
37 /* AUTHOR */
38 /* */
39 /* Kenneth Maxwell, Microsoft Corporation */
40 /* */
41 /* DESCRIPTION */
42 /* */
43 /* This function checks for errors in the utility circle point get */
44 /* call. */
45 /* */
46 /* INPUT */
47 /* */
48 /* xcenter x-coord of center of circle */
49 /* ycenter y-coord of center of circle */
50 /* r Radius of circle */
51 /* angle The angle where the point is */
52 /* point Return value of the point at */
53 /* the angle */
54 /* */
55 /* OUTPUT */
56 /* */
57 /* status Completion status */
58 /* */
59 /* CALLS */
60 /* */
61 /* _gx_utility_circle_point_get */
62 /* */
63 /* CALLED BY */
64 /* */
65 /* Application Code */
66 /* GUIX Internal Code */
67 /* */
68 /* RELEASE HISTORY */
69 /* */
70 /* DATE NAME DESCRIPTION */
71 /* */
72 /* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */
73 /* 09-30-2020 Kenneth Maxwell Modified comment(s), */
74 /* resulting in version 6.1 */
75 /* */
76 /**************************************************************************/
_gxe_utility_circle_point_get(INT xcenter,INT ycenter,UINT r,INT angle,GX_POINT * point)77 UINT _gxe_utility_circle_point_get(INT xcenter, INT ycenter, UINT r, INT angle, GX_POINT *point)
78 {
79 UINT status;
80
81 /* Check for invalid input pointers. */
82 if (point == GX_NULL)
83 {
84 return GX_PTR_ERROR;
85 }
86
87 if (r == 0)
88 {
89 return GX_INVALID_VALUE;
90 }
91
92 /* Call the actual utility circle point get. */
93 status = _gx_utility_circle_point_get(xcenter, ycenter, r, angle, point);
94
95 return status;
96 }
97
98