xtd - Reference Guide  0.1.1
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
color_palette.h
Go to the documentation of this file.
1 #pragma once
5 #include <cstdint>
6 #include <vector>
7 #include <xtd/object.h>
8 #include "../color.h"
9 
11 namespace xtd {
13  namespace drawing {
15  class image;
17 
20  namespace imaging {
29  class color_palette final : public object {
30  public:
32  color_palette(const color_palette&) = default;
33  color_palette& operator=(const color_palette&) = default;
34  bool operator==(const color_palette& value) const {return entries_ == value.entries_ && flags_ == value.flags_;}
35  bool operator!=(const color_palette& value) const {return !operator==(value);}
37 
40  const std::vector<color>& entries() const {return entries_;}
41 
47  int32_t flags() const {return flags_;}
48 
49  private:
50  friend class xtd::drawing::image;
51  color_palette() = default;
52  std::vector<color> entries_;
53  int32_t flags_ = 0;
54  };
55  }
56  }
57 }
An abstract base class that provides functionality for the bitmap and metafile descended classes.
Definition: image.h:34
Defines an array of colors that make up a color palette. The colors are 32-bit ARGB colors....
Definition: color_palette.h:29
const std::vector< color > & entries() const
Gets an array of color structures.
Definition: color_palette.h:40
int32_t flags() const
Gets a value that specifies how to interpret the color information in the array of colors.
Definition: color_palette.h:47
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition: object.h:26
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition: system_report.h:17
Contains xtd::object class.