Fesapi 2.9.0.1
This project provides C++ classes which allow an easy access in import and export to the Energistics standards.
Loading...
Searching...
No Matches
AbstractColorMap.h
1/*-----------------------------------------------------------------------
2Licensed to the Apache Software Foundation (ASF) under one
3or more contributor license agreements. See the NOTICE file
4distributed with this work for additional information
5regarding copyright ownership. The ASF licenses this file
6to you under the Apache License, Version 2.0 (the
7"License"; you may not use this file except in compliance
8with the License. You may obtain a copy of the License at
9
10http://www.apache.org/licenses/LICENSE-2.0
11
12Unless required by applicable law or agreed to in writing,
13software distributed under the License is distributed on an
14"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15KIND, either express or implied. See the License for the
16specific language governing permissions and limitations
17under the License.
18-----------------------------------------------------------------------*/
19#pragma once
20
21#include "../common/AbstractObject.h"
22
23namespace RESQML2_NS
24{
26 class AbstractColorMap : public COMMON_NS::AbstractObject
27 {
28 public:
29 virtual ~AbstractColorMap() = default;
30
39 virtual DLL_IMPORT_OR_EXPORT void setHsvColors(unsigned int colorCount,
40 double const* hsvColors, double const* alphas = nullptr, std::vector<std::string> const& colorTitles = std::vector<std::string>(),
41 double const* indices = nullptr) = 0;
42
51 DLL_IMPORT_OR_EXPORT void setRgbColors(unsigned int colorCount,
52 double const* rgbColors, double const* alphas = nullptr, std::vector<std::string> const& colorTitles = std::vector<std::string>(),
53 double const* indices = nullptr);
54
63 DLL_IMPORT_OR_EXPORT void setRgbColors(unsigned int colorCount,
64 unsigned int const* rgbColors, double const* alphas = nullptr, std::vector<std::string> const& colorTitles = std::vector<std::string>(),
65 double const* indices = nullptr);
66
72 DLL_IMPORT_OR_EXPORT virtual uint64_t getColorCount() const = 0;
73
78 DLL_IMPORT_OR_EXPORT double getHue(double colorIndex) const;
79
84 DLL_IMPORT_OR_EXPORT double getSaturation(double colorIndex) const;
85
90 DLL_IMPORT_OR_EXPORT double getValue(double colorIndex) const;
91
96 DLL_IMPORT_OR_EXPORT double getAlpha(double colorIndex) const;
97
104 DLL_IMPORT_OR_EXPORT void getRgbColor(double colorIndex, double& red, double& green, double& blue) const;
105
112 DLL_IMPORT_OR_EXPORT void getRgbColor(double colorIndex, unsigned int& red, unsigned int& green, unsigned int& blue) const;
113
121 DLL_IMPORT_OR_EXPORT bool hasColorTitle(double colorIndex) const;
122
130 DLL_IMPORT_OR_EXPORT std::string getColorTitle(double colorIndex) const;
131
132 void loadTargetRelationships() {};
133
134 private:
138 virtual gsoap_eml2_3::resqml22__HsvColor* getColor(double colorIndex) const = 0;
139
140 protected:
144 DLL_IMPORT_OR_EXPORT AbstractColorMap(gsoap_resqml2_0_1::eml20__DataObjectReference* partialObject) : COMMON_NS::AbstractObject(partialObject) {}
145
149 AbstractColorMap(gsoap_eml2_3::resqml22__AbstractColorMap* fromGsoap) : COMMON_NS::AbstractObject(fromGsoap) {}
150
155 AbstractColorMap() {}
156 };
157}
Map of abstract colors.
Definition AbstractColorMap.h:27
double getHue(double colorIndex) const
double getAlpha(double colorIndex) const
bool hasColorTitle(double colorIndex) const
Queries if 'colorIndex' has color title.
virtual uint64_t getColorCount() const =0
Gets color count.
double getValue(double colorIndex) const
std::string getColorTitle(double colorIndex) const
Gets color title.
double getSaturation(double colorIndex) const
void getRgbColor(double colorIndex, double &red, double &green, double &blue) const
void setRgbColors(unsigned int colorCount, double const *rgbColors, double const *alphas=nullptr, std::vector< std::string > const &colorTitles=std::vector< std::string >(), double const *indices=nullptr)
void setRgbColors(unsigned int colorCount, unsigned int const *rgbColors, double const *alphas=nullptr, std::vector< std::string > const &colorTitles=std::vector< std::string >(), double const *indices=nullptr)
virtual void setHsvColors(unsigned int colorCount, double const *hsvColors, double const *alphas=nullptr, std::vector< std::string > const &colorTitles=std::vector< std::string >(), double const *indices=nullptr)=0
void getRgbColor(double colorIndex, unsigned int &red, unsigned int &green, unsigned int &blue) const