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:61
Represents an ARGB (alpha, red, green, blue) color.
Definition color.hpp:46
An abstract base class that provides functionality for the bitmap and metafile descended classes.
Definition image.hpp:49
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
object()=default
Create a new instance of the ultimate base class object.
Contains xtd::drawing::color class.
int32_t int32
Represents a 32-bit signed integer.
Definition int32.hpp:23
@ other
The operating system is other.
Definition platform_id.hpp:58
The xtd::collections namespace contains interfaces and classes that define various collections of obj...
Definition any_pair.hpp:10
The xtd::drawing::imaging namespace provides advanced GDI+ imaging functionality. Basic graphics func...
Definition bitmap_data.hpp:15
The xtd::drawing namespace provides access to GDI+ basic graphics functionality. More advanced functi...
Definition actions_system_images.hpp:10
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
Stores an ordered pair of integers, which specify a height and width.
Definition size.hpp:32