API Documentation
Loading...
Searching...
No Matches
ACIColor.h
Go to the documentation of this file.
1/*--------------------------------------------------------------------------------------------
2Copyright (c) 2019, NDEVR LLC
3tyler.parke@ndevr.org
4 __ __ ____ _____ __ __ _______
5 | \ | | | __ \ | ___|\ \ / / | __ \
6 | \ | | | | \ \ | |___ \ \ / / | |__) |
7 | . \| | | |__/ / | |___ \ V / | _ /
8 | |\ |_|_____/__|_____|___\_/____| | \ \
9 |__| \__________________________________| \__\
10
11Subject to the terms of the Enterprise+ Agreement, NDEVR hereby grants
12Licensee a limited, non-exclusive, non-transferable, royalty-free license
13(without the right to sublicense) to use the API solely for the purpose of
14Licensee's internal development efforts to develop applications for which
15the API was provided.
16
17The above copyright notice and this permission notice shall be included in all
18copies or substantial portions of the Software.
19
20THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
21INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
22PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
23FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
24OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25DEALINGS IN THE SOFTWARE.
26
27Library: Base
28File: ACIColor
29Included in API: True
30Author(s): Tyler Parke
31 *-----------------------------------------------------------------------------------------**/
32#pragma once
33#include "DLLInfo.h"
34#include <NDEVR/Color.h>
35#include <NDEVR/BaseValues.h>
36namespace NDEVR
37{
38 class String;
39 class TranslatedString;
40 class RGBColor;
41 class HSBColor;
42 class XYZColor;
43 class HSLColor;
44 class LABColor;
45
46 /** ----------------------------------------------------------------------------
47 Class: ACIColor
48
49 \brief ACI colors are the standard colors used in AutoCAD-based products.
50 Each color is identified by an ACI number, an integer from 1 through 255.
51
52 Standard color names are available only for colors 1 through 7. The colors are
53 assigned as follows: 0 Black, 1 Red, 2 Yellow, 3 Green, 4 Cyan, 5 Blue, 6 Magenta,
54 7 White 8 Dark Gray, 9 Light Gray 10-249 are shades of colors designed to provide a
55 spectrum to see most things. 250-255 are shades of gray going from dark to light
56 ----------------------------------------------------------------------------*/
57 class ACIColor : public Color
58 {
59 public:
61 : m_index(0)
62 {}
63 constexpr explicit ACIColor(uint01 color)
64 : m_index(color)
65 {};
71
74
75
76 uint01 getIndex() const { return m_index; }
77
78 static const uint01 ASI_BLACK = 0;
79 static const uint01 ASI_RED = 1;
80 static const uint01 ASI_YELLOW = 2;
81 static const uint01 ASI_GREEN = 3;
82 static const uint01 ASI_TEAL = 4;
83 static const uint01 ASI_BLUE = 5;
84 static const uint01 ASI_PURPLE = 6;
85 static const uint01 ASI_WHITE = 7;
86 private:
87 uint01 m_index;
88 static const RGBColor CAD_INDEX[];
89 };
90 template<>
92 template<>
94 template<>
95 constexpr const ACIColor Constant<ACIColor>::Min = ACIColor(7);//Duplicate white seems silly so we will reserve this value
96}
97
98
#define NDEVR_BASE_API
Definition DLLInfo.h:78
ACI colors are the standard colors used in AutoCAD-based products. Each color is identified by an ACI...
Definition ACIColor.h:58
NDEVR_BASE_API ACIColor(const XYZColor &)
static const uint01 ASI_RED
Definition ACIColor.h:79
ACIColor()
Definition ACIColor.h:60
NDEVR_BASE_API TranslatedString getName() const
NDEVR_BASE_API ACIColor(const HSBColor &)
NDEVR_BASE_API RGBColor getRBGAColor() const
static const uint01 ASI_GREEN
Definition ACIColor.h:81
NDEVR_BASE_API ACIColor(const HSLColor &)
static const uint01 ASI_WHITE
Definition ACIColor.h:85
NDEVR_BASE_API ACIColor(const RGBColor &)
static const uint01 ASI_YELLOW
Definition ACIColor.h:80
NDEVR_BASE_API ACIColor(const LABColor &)
constexpr ACIColor(uint01 color)
Definition ACIColor.h:63
static const uint01 ASI_TEAL
Definition ACIColor.h:82
static const uint01 ASI_BLACK
Definition ACIColor.h:78
static const uint01 ASI_BLUE
Definition ACIColor.h:83
static const uint01 ASI_PURPLE
Definition ACIColor.h:84
uint01 getIndex() const
Definition ACIColor.h:76
Definition Color.h:36
Definition HSBColor.h:57
The HSL (Hue, Saturation, Luminosity) color model defines a color space in.
Definition HSLColor.h:47
A Lab color space is a color-opponent space with dimension L for luminance and a and b for the color-...
Definition LABColor.h:60
Represents a color in the RGB space with optional alpha transparency.
Definition RGBColor.h:53
The core String class for the software.
Definition String.h:47
Any text displayed to the user should be defined as a TranslatedString which allows the.
Definition TranslatedString.h:13
In opposition to the previous models, the CIE XYZ model defines an absolute color space....
Definition XYZColor.h:50
Definition ACIColor.h:37
uint8_t uint01
-Defines an alias representing a 1 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:78
Defines for a given type (such as sint04, fltp08, UUID, etc) a maximum, minimum, and reserved.
Definition BaseValues.hpp:230