xtd 0.2.0
Loading...
Searching...
No Matches
color_palette.h
Go to the documentation of this file.
1
4#pragma once
5#include "../color.h"
6#include <xtd/iequatable>
7#include <xtd/object>
8#include <cstdint>
9#include <vector>
10
12namespace xtd {
14 namespace drawing {
16 class image;
18
21 namespace imaging {
30 class color_palette final : public object, public xtd::iequatable<color_palette> {
31 public:
33 color_palette(const color_palette&) = default;
34 color_palette& operator =(const color_palette&) = default;
36
38
42 const std::vector<color>& entries() const noexcept {return entries_;}
43
49 int32 flags() const noexcept {return flags_;}
51
53
55 using object::equals;
56 bool equals(const color_palette& value) const noexcept override {return entries_ == value.entries_ && flags_ == value.flags_;}
58
59 private:
60 friend class xtd::drawing::image;
61 color_palette() = default;
62 std::vector<color> entries_;
63 int32 flags_ = 0;
64 };
65 }
66 }
67}
An abstract base class that provides functionality for the bitmap and metafile descended classes.
Definition image.h:49
Defines an array of colors that make up a color palette. The colors are 32-bit ARGB colors....
Definition color_palette.h:30
const std::vector< color > & entries() const noexcept
Gets an array of color structures.
Definition color_palette.h:42
int32 flags() const noexcept
Gets a value that specifies how to interpret the color information in the array of colors.
Definition color_palette.h:49
Defines a generalized method that a value type or class implements to create a type-specific method f...
Definition iequatable.h:22
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition object.h:42
virtual bool equals(const object &obj) const noexcept
Determines whether the specified object is equal to the current object.
int32_t int32
Represents a 32-bit signed integer.
Definition int32.h:23
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10