xtd 0.2.0
color_palette.hpp
Go to the documentation of this file.
1
4#pragma once
5#include "../color.hpp"
6#include <xtd/collections/generic/list>
7#include <xtd/iequatable>
8#include <xtd/object>
9#include <cstdint>
10#include <vector>
11
13namespace xtd {
15 namespace drawing {
17 class image;
19
22 namespace imaging {
31 class color_palette final : public object, public xtd::iequatable<color_palette> {
32 public:
34 color_palette(color_palette&&) = default;
35 color_palette(const color_palette&) = default;
36 color_palette& operator =(color_palette&&) = default;
37 color_palette& operator =(const color_palette&) = default;
39
41
45 xtd::array<color> entries() const noexcept;
46
52 int32 flags() const noexcept;
54
56
61 bool equals(const object& obj) const noexcept override;
65 bool equals(const color_palette& other) const noexcept override;
66
69 xtd::size get_hash_code() const noexcept override;
71
72 private:
73 friend class xtd::drawing::image;
74 color_palette() = default;
75 xtd::collections::generic::list<color> entries_;
76 int32 flags_ = 0;
77 };
78 }
79 }
80}
Provides methods for creating, manipulating, searching, and sorting arrays, thereby serving as the ba...
Definition array.hpp:59
Represents an ARGB (alpha, red, green, blue) color.
Definition color.hpp:49
An abstract base class that provides functionality for the bitmap and metafile descended classes.
Definition image.hpp:53
Defines an array of colors that make up a color palette. The colors are 32-bit ARGB colors....
Definition color_palette.hpp:31
xtd::array< color > entries() const noexcept
Gets an array of color structures.
xtd::size get_hash_code() const noexcept override
Serves as a hash function for a particular type.
bool equals(const object &obj) const noexcept override
Determines whether the specified object is equal to the current object.
int32 flags() const noexcept
Gets a value that specifies how to interpret the color information in the array of colors.
Defines a generalized method that a value type or class implements to create a type-specific method f...
Definition iequatable.hpp:22
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition object.hpp:44
int32_t int32
Represents a 32-bit signed integer.
Definition int32.hpp:23
@ other
The operating system is other.
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.hpp:10
Stores an ordered pair of integers, which specify a height and width.
Definition size.hpp:31