GL Studio SCECpp Runtime Library
gls_color.h
Go to the documentation of this file.
1 #ifndef _GLS_COLOR_H
2 #define _GLS_COLOR_H
3 
4 /*! \file gls_color.h
5 \brief This header defines a 4 component RGBA color for use in
6  the GL Studio DO-178B Runtime Library.
7 
8 \par Copyright Information
9 Copyright (C) 1999-2012 The DiSTI Corporation<br>
10 Orlando, FL USA<br>
11 All rights reserved.<br>
12 
13  This file is copyrighted software and contains proprietary trade secrets of
14 DiSTI, and embodies substantial creative efforts as well as confidential
15 information, ideas, and expressions.
16 
17  Permission to use, and copy this software and its documentation for any
18 purpose is hereby granted per the Distribution Agreement and/or the Licensing
19 Agreement signed with DiSTI. This permission is granted provided that:
20  1. The above copyright notice appears in all copies.
21  2. That both the copyright notice and this permission notice appear in
22  the supporting documentation.
23  3. That the names DiSTI and GL Studio not be used in advertising or
24  publicity pertaining to distribution of the software without specific,
25  written prior permission of DiSTI.
26 
27  Permission to modify the software is granted, but not the right to
28 distribute the source code whether modified, or non-modified. Modifying the
29 software might invalidate the DO-178B certification package.
30 
31  Permission to distribute binaries produced by compiling source code, or
32 modified source code is granted, provided you:
33  1. Provide your name and address as the primary contact for the support
34  of your modified version.
35  2. Retain our contact information in regard to use of the base software.
36 
37  DiSTI does not provide warranty for this software or guarantee that it
38 satisfies any specification or requirement unless otherwise stated in a
39 specific contractual arrangement between the customer and DiSTI.
40 
41 */
42 
43 #include "gls_include.h"
44 #include "gls_types.h"
45 
46 /** A 4 component RGBA color. */
47 struct GlsColor
48 {
49  GlsUChar r; /**< Red 0-255 range */
50  GlsUChar g; /**< Green 0-255 range */
51  GlsUChar b; /**< Blue, 0-255 range */
52  GlsUChar a; /**< Alpha 0-255 range */
53 
54  /** largest possible value for a color component */
56 
57  #if defined( GLS_DEBUG )
58  /** Determine if this color is valid
59  * \return GLS_TRUE if valid else GLS_FALSE
60  * \pre none
61  * \post none
62  */
63  GlsBool IsValid( void ) const;
64  #endif // GLS_DEBUG
65 };
66 
67 #if defined( GLS_DEBUG )
68 #pragma BullseyeCoverage save off
69 /* Determine if this color is valid ( GLS_DEBUG only )
70  * \return GLS_TRUE if valid else GLS_FALSE
71  * \pre none
72  * \post none
73  */
74 inline GlsBool GlsColor::IsValid( void ) const
75 {
76  // all values are valid
77  return( GLS_TRUE );
78 }
79 #pragma BullseyeCoverage restore
80 #endif // GLS_DEBUG
81 
82 
83 #endif // _GLS_COLOR_H
unsigned char GlsUChar
Definition: gls_types.h:61
GlsUChar g
Definition: gls_color.h:50
Definition: gls_color.h:47
bool GlsBool
Definition: gls_types.h:96
GlsUChar b
Definition: gls_color.h:51
GlsUChar a
Definition: gls_color.h:52
This header defines the basic types used by the GL Studio DO-178B Runtime Library.
This header defines any preprocessor defines needed to configure the GL Studio DO-178B Runtime Librar...
GlsUChar r
Definition: gls_color.h:49
#define GLS_TRUE
Definition: gls_types.h:99
static const GlsUChar MAX_COMPONENT_VALUE
Definition: gls_color.h:55
#define GLSUCHAR_MAX
Definition: gls_types.h:63