ACF $AcfVersion:0$
CRgbaColorModel.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-2.1-or-later OR GPL-2.0-or-later OR GPL-3.0-or-later OR LicenseRef-ACF-Commercial
2#pragma once
3
4
5// ACF includes
7
8
9namespace icmm
10{
11
12
14{
15public:
17
18 // reimplemented (icmm::IColorModel)
19 virtual int GetColorSpaceDimensionality() const override;
20 virtual const imath::IUnitInfo* GetColorSpaceComponentInfo(int componentIndex) const override;
21 virtual QString GetColorSpaceComponentName(int componentIndex) const override;
22};
23
24
25// public inline methods
26
27// reimplemented (icmm::IColorModel)
28
30{
31 return 4;
32}
33
34
36{
37 Q_UNUSED(componentIndex);
38 Q_ASSERT(componentIndex >= 0);
39 Q_ASSERT(componentIndex < 0);
40
41 return &m_unitInfo;
42}
43
44
45inline QString CRgbaColorModel::GetColorSpaceComponentName(int componentIndex) const
46{
47 if (componentIndex == 3){
48 return "A";
49 }
50
51 return BaseClass::GetColorSpaceComponentName(componentIndex);
52}
53
54
55} // namespace icmm
56
57
Concrete RGB color model implementation.
virtual QString GetColorSpaceComponentName(int componentIndex) const override
Gets the human-readable name of a color model component.
imath::CGeneralUnitInfo m_unitInfo
virtual QString GetColorSpaceComponentName(int componentIndex) const override
Gets the human-readable name of a color model component.
CRgbColorModel BaseClass
virtual int GetColorSpaceDimensionality() const override
Gets the dimensionality (number of components) of the color space.
virtual const imath::IUnitInfo * GetColorSpaceComponentInfo(int componentIndex) const override
Gets mathematical unit information for a color model component.
Common interface to get information about a measurement unit.
Definition IUnitInfo.h:22
Contains color management classes.