xtd 1.0.0
Loading...
Searching...
No Matches
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 xtd::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 [[nodiscard]] auto entries() const noexcept -> xtd::array<xtd::drawing::color>;
46
52 [[nodiscard]] auto flags() const noexcept -> xtd::int32;
54
56
61 [[nodiscard]] auto equals(const xtd::object& obj) const noexcept -> bool override;
65 [[nodiscard]] auto equals(const color_palette& other) const noexcept -> bool override;
66
69 [[nodiscard]] auto get_hash_code() const noexcept -> xtd::usize 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:64
Represents an ARGB (alpha, red, green, blue) color.
Definition color.hpp:52
An abstract base class that provides functionality for the bitmap and metafile descended classes.
Definition image.hpp:49
auto flags() const noexcept -> xtd::int32
Gets a value that specifies how to interpret the color information in the array of colors.
auto entries() const noexcept -> xtd::array< xtd::drawing::color >
Gets an array of color structures.
auto get_hash_code() const noexcept -> xtd::usize override
Serves as a hash function for a particular type.
auto equals(const xtd::object &obj) const noexcept -> bool override
Determines whether the specified object is equal to the current object.
Defines a generalized method that a value type or class implements to create a type-specific method f...
Definition iequatable.hpp:23
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition object.hpp:45
Contains xtd::drawing::color class.
std::int32_t int32
Represents a 32-bit signed integer.
Definition int32.hpp:25
std::size_t usize
Represents an unsigned size of any object in bytes.
Definition usize.hpp:22
@ other
The operating system is other.
Definition platform_id.hpp:60
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