GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: gxe_utility_gradient_create.c Lines: 6 6 100.0 %
Date: 2026-03-06 19:21:09 Branches: 8 8 100.0 %

Line Branch Exec Source
1
/***************************************************************************
2
 * Copyright (c) 2024 Microsoft Corporation
3
 * Copyright (c) 2026-present Eclipse ThreadX contributors
4
 *
5
 * This program and the accompanying materials are made available under the
6
 * terms of the MIT License which is available at
7
 * https://opensource.org/licenses/MIT.
8
 *
9
 * SPDX-License-Identifier: MIT
10
 **************************************************************************/
11
12
13
/**************************************************************************/
14
/**************************************************************************/
15
/**                                                                       */
16
/** GUIX Component                                                        */
17
/**                                                                       */
18
/**   Utility (Utility)                                                   */
19
/**                                                                       */
20
/**************************************************************************/
21
22
#define GX_SOURCE_CODE
23
24
25
/* Include necessary system files.  */
26
27
#include "gx_api.h"
28
#include "gx_utility.h"
29
30
GX_CALLER_CHECKING_EXTERNS
31
32
33
/**************************************************************************/
34
/*                                                                        */
35
/*  FUNCTION                                               RELEASE        */
36
/*                                                                        */
37
/*    _gxe_utility_gradient_create                        PORTABLE C      */
38
/*                                                           6.1          */
39
/*  AUTHOR                                                                */
40
/*                                                                        */
41
/*    Kenneth Maxwell, Microsoft Corporation                              */
42
/*                                                                        */
43
/*  DESCRIPTION                                                           */
44
/*                                                                        */
45
/*    This function checks for errors in the utility gradient create      */
46
/*    function call.                                                      */
47
/*                                                                        */
48
/*  INPUT                                                                 */
49
/*                                                                        */
50
/*    gradient                          Pointer to GX_GRADIENT            */
51
/*    width                             Width of gradient to create       */
52
/*    height                            Height of gradient to create      */
53
/*    type                              Gradient type to create           */
54
/*    alpha_start                       Gradient starting alpha value     */
55
/*    alpha_end                         Gradient ending alpha value       */
56
/*                                                                        */
57
/*  OUTPUT                                                                */
58
/*                                                                        */
59
/*    status                                Completion status             */
60
/*                                                                        */
61
/*  CALLS                                                                 */
62
/*                                                                        */
63
/*    _gx_utility_gradient_create           Actual utility gradient create*/
64
/*                                            call                        */
65
/*                                                                        */
66
/*  CALLED BY                                                             */
67
/*                                                                        */
68
/*    Application Code                                                    */
69
/*                                                                        */
70
/**************************************************************************/
71
17
UINT _gxe_utility_gradient_create(GX_GRADIENT *gradient, GX_VALUE width, GX_VALUE height,
72
                                  UCHAR type, GX_UBYTE alpha_start, GX_UBYTE alpha_end)
73
{
74
UINT status;
75
76
    /* Check for appropriate caller.  */
77

17
    GX_INIT_AND_THREADS_CALLER_CHECKING
78
79
15
    if (gradient == GX_NULL)
80
    {
81
2
        return GX_PTR_ERROR;
82
    }
83
84
13
    status = _gx_utility_gradient_create(gradient, width, height, type, alpha_start, alpha_end);
85
86
13
    return status;
87
}
88