xtd 1.0.0
Loading...
Searching...
No Matches
control_paint.hpp
Go to the documentation of this file.
1
4#pragma once
5#include "../forms_export.hpp"
6#include "button_state.hpp"
7#include "border_sides.hpp"
8#include "border_style.hpp"
9#include "image_layout.hpp"
10#include "text_format_flags.hpp"
11#include <xtd/optional>
12#include <xtd/drawing/color>
13#include <xtd/drawing/font>
14#include <xtd/drawing/graphics>
15#include <xtd/drawing/image>
16#include <xtd/drawing/rectangle>
17#include <xtd/drawing/string_format>
18#include <xtd/drawing/system_fonts>
19#include <string>
20
22namespace xtd {
24 namespace forms {
26 class control;
28
40 public:
42
55 [[nodiscard]] static auto average(const xtd::drawing::color& color1, const xtd::drawing::color& color2, double weight, bool average_alpha) -> xtd::drawing::color;
56
67 [[nodiscard]] static auto average(const xtd::drawing::color& color1, const xtd::drawing::color& color2, double weight) -> xtd::drawing::color;
68
73 [[nodiscard]] static auto dark(const xtd::drawing::color& base_color) -> xtd::drawing::color;
78 [[nodiscard]] static auto dark(const xtd::drawing::color& base_color, double perc_of_dark_dark) -> xtd::drawing::color;
79
84 [[nodiscard]] static auto dark_dark(const xtd::drawing::color& base_color) -> xtd::drawing::color;
85
101
119
129
144 static auto draw_image(xtd::drawing::graphics& graphics, const xtd::drawing::image& image, int32 x, int32 y, int32 width, int32 height, xtd::forms::image_layout image_layout) -> void;
145
153 static auto draw_image_disabled(xtd::drawing::graphics& graphics, const xtd::drawing::image& image, int32 x, int32 y, float brightness) -> void;
161 static auto draw_image_disabled(xtd::drawing::graphics& graphics, const xtd::drawing::image& image, int32 x, int32 y, const xtd::drawing::color& background) -> void;
168 static auto draw_image_disabled(xtd::drawing::graphics& graphics, const xtd::drawing::image& image, const xtd::drawing::point& location, float brightness) -> void;
175 static auto draw_image_disabled(xtd::drawing::graphics& graphics, const xtd::drawing::image& image, const xtd::drawing::point& location, const xtd::drawing::color& background) -> void;
176
181 [[nodiscard]] static auto light(const xtd::drawing::color& base_color) -> xtd::drawing::color;
186 [[nodiscard]] static auto light(const xtd::drawing::color& base_color, double perc_of_light_light) -> xtd::drawing::color;
187
192 [[nodiscard]] static auto light_light(const xtd::drawing::color& base_color) -> xtd::drawing::color;
193
199 };
200 }
201}
Contains xtd::forms::border_sides enum class.
Contains xtd::forms::border_style enum class.
Contains xtd::forms::button_state enum class.
Represents an ARGB (alpha, red, green, blue) color.
Definition color.hpp:52
Defines an object used to draw lines and curves. This class cannot be inherited.
Definition graphics.hpp:67
An abstract base class that provides functionality for the bitmap and metafile descended classes.
Definition image.hpp:49
Encapsulates text layout information (such as alignment, orientation and tab stops) display manipulat...
Definition string_format.hpp:30
Provides methods used to paint common Windows controls and their elements. This class cannot be inher...
Definition control_paint.hpp:39
static auto draw_image_disabled(xtd::drawing::graphics &graphics, const xtd::drawing::image &image, const xtd::drawing::point &location, float brightness) -> void
Draws the specified image in a disabled state.
static auto draw_button(const xtd::forms::control &control, xtd::drawing::graphics &graphics, const xtd::drawing::rectangle &rectangle, xtd::forms::button_state state) -> void
Draws button in a specified control and graohics with specified bounds and state.
static auto average(const xtd::drawing::color &color1, const xtd::drawing::color &color2, double weight, bool average_alpha) -> xtd::drawing::color
Returns the weighted average color between the two given colors.
static auto dark_dark(const xtd::drawing::color &base_color) -> xtd::drawing::color
Creates a new dark color object for the control from the specified color.
static auto draw_image(xtd::drawing::graphics &graphics, const xtd::drawing::image &image, const xtd::drawing::rectangle &rectangle, xtd::forms::image_layout image_layout) -> void
Draws the specified image in a specified rectangle with specified layout.
static auto draw_image_disabled(xtd::drawing::graphics &graphics, const xtd::drawing::image &image, int32 x, int32 y, float brightness) -> void
Draws the specified image in a disabled state.
static auto dark(const xtd::drawing::color &base_color) -> xtd::drawing::color
Creates a new dark color object for the control from the specified color.
static auto draw_border_from_back_color(const xtd::forms::control &control, xtd::drawing::graphics &graphics, xtd::forms::border_style border, xtd::forms::border_sides sides, const xtd::drawing::color &back_color, const xtd::drawing::rectangle &rect) -> void
Draws border in a specified control and graohics with specified style, sides, back color and bounds.
static auto draw_border(const xtd::forms::control &control, xtd::drawing::graphics &graphics, xtd::forms::border_style border, xtd::forms::border_sides sides, const xtd::drawing::color &color, const xtd::drawing::rectangle &rect, bool light) -> void
Draws border in a specified control and graohics with specified style, sides, color and bounds.
static auto draw_button(const xtd::forms::control &control, xtd::drawing::graphics &graphics, xtd::int32 x, xtd::int32 y, xtd::int32 width, xtd::int32 height, xtd::forms::button_state state) -> void
Draws button in a specified control and graohics with specified bounds and state.
static auto light(const xtd::drawing::color &base_color) -> xtd::drawing::color
Creates a new light color object for the control from the specified color.
static auto light(const xtd::drawing::color &base_color, double perc_of_light_light) -> xtd::drawing::color
Creates a new light color object for the control from the specified color and lightens it by the spec...
static auto string_format(xtd::forms::text_format_flags flags) -> xtd::drawing::string_format
Convert xtd::forms::text_format_flags to xtd::drawing::string_format.
static auto light_light(const xtd::drawing::color &base_color) -> xtd::drawing::color
Creates a new light color object for the control from the specified color.
static auto draw_image_disabled(xtd::drawing::graphics &graphics, const xtd::drawing::image &image, int32 x, int32 y, const xtd::drawing::color &background) -> void
Draws the specified image in a disabled state.
static auto draw_image(xtd::drawing::graphics &graphics, const xtd::drawing::image &image, int32 x, int32 y, int32 width, int32 height, xtd::forms::image_layout image_layout) -> void
Draws the specified image in a specified rectangle with specified layout.
static auto draw_border(const xtd::forms::control &control, xtd::drawing::graphics &graphics, xtd::forms::border_style border, xtd::forms::border_sides sides, const xtd::drawing::color &color, const xtd::drawing::rectangle &rect) -> void
Draws border in a specified control and graohics with specified style, sides, color and bounds.
static auto average(const xtd::drawing::color &color1, const xtd::drawing::color &color2, double weight) -> xtd::drawing::color
Returns the weighted average color between the two given colors.
static auto dark(const xtd::drawing::color &base_color, double perc_of_dark_dark) -> xtd::drawing::color
Creates a new dark color object for the control from the specified color and darkens it by the specif...
static auto draw_image_disabled(xtd::drawing::graphics &graphics, const xtd::drawing::image &image, const xtd::drawing::point &location, const xtd::drawing::color &background) -> void
Draws the specified image in a disabled state.
Defines the base class for controls, which are components with visual representation.
Definition control.hpp:81
Contains forms_export_ keyword.
#define static_
This keyword is use to represent a static object. A static object can't be instantiated (constructors...
Definition static.hpp:38
#define forms_export_
Define shared library export.
Definition forms_export.hpp:13
std::int32_t int32
Represents a 32-bit signed integer.
Definition int32.hpp:25
text_format_flags
Specifies the display and layout information for text strings.
Definition text_format_flags.hpp:22
button_state
Specifies the appearance of a button.
Definition button_state.hpp:23
image_layout
Specifies the position of the image on the control.
Definition image_layout.hpp:21
border_sides
Specifies how a control anchors to the edges of its container.
Definition border_sides.hpp:23
border_style
Specifies the border style for a control.
Definition border_style.hpp:22
Contains xtd::forms::image_layout enum class.
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition texts.hpp:219
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
Represents an ordered pair of integer x- and y-coordinates that defines a point in a two-dimensional ...
Definition point.hpp:54
Stores a set of four integers that represent the location and size of a rectangle.
Definition rectangle.hpp:44
Contains xtd::forms::text_format_flags enum class.