GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: gxe_utility_pixelmap_rotate.c Lines: 5 5 100.0 %
Date: 2026-03-06 19:21:09 Branches: 4 4 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
/*  FUNCTION                                               RELEASE        */
35
/*                                                                        */
36
/*    _gxe_utility_pixelmap_rotation                      PORTABLE C      */
37
/*                                                           6.1          */
38
/*  AUTHOR                                                                */
39
/*                                                                        */
40
/*    Kenneth Maxwell, Microsoft Corporation                              */
41
/*                                                                        */
42
/*  DESCRIPTION                                                           */
43
/*                                                                        */
44
/*    This function checks for errors in the utility pixelmap rotate call.*/
45
/*                                                                        */
46
/*  INPUT                                                                 */
47
/*                                                                        */
48
/*    src                                   The pixelmap to be rotated    */
49
/*    angle                                 The angle to be rotated       */
50
/*    destination                           The rotated bitmap to be      */
51
/*                                            returned                    */
52
/*    rot_cx                                X coordinate of rotation      */
53
/*                                            center                      */
54
/*    rot_cy                                Y coordinate of rotation      */
55
/*                                            center                      */
56
/*                                                                        */
57
/*  OUTPUT                                                                */
58
/*                                                                        */
59
/*    status                                Completion status             */
60
/*                                                                        */
61
/*  CALLS                                                                 */
62
/*                                                                        */
63
/*    _gx_utility_pixelmap_rotation                                       */
64
/*                                                                        */
65
/*  CALLED BY                                                             */
66
/*                                                                        */
67
/*    Application Code                                                    */
68
/*    GUIX Internal Code                                                  */
69
/*                                                                        */
70
/**************************************************************************/
71
12725
UINT _gxe_utility_pixelmap_rotate(GX_PIXELMAP *src, INT angle, GX_PIXELMAP *destination, INT *rot_cx, INT *rot_cy)
72
{
73
UINT status;
74
75
    /* Check for invalid input pointers.  */
76

12725
    if ((src == GX_NULL) || (destination == GX_NULL))
77
    {
78
3
        return GX_PTR_ERROR;
79
    }
80
81
    /* Call the actual utility rectangle center function.  */
82
12722
    status = _gx_utility_pixelmap_rotate(src, angle, destination, rot_cx, rot_cy);
83
84
12722
    return status;
85
}
86