xtd - Reference Guide
0.1.2
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
|
#include <control_paint.h>
Provides methods used to paint common Windows controls and their elements. This class cannot be inherited.
Inherits xtd::static_object.
Static Public Member Functions | |
static xtd::drawing::color | average (const xtd::drawing::color &color1, const xtd::drawing::color &color2, double weight) |
Returns the weighted average color between the two given colors. | |
static xtd::drawing::color | average (const xtd::drawing::color &color1, const xtd::drawing::color &color2, double weight, bool average_alpha) |
Returns the weighted average color between the two given colors. | |
static xtd::drawing::color | dark (const xtd::drawing::color &base_color) |
Creates a new dark color object for the control from the specified color. | |
static xtd::drawing::color | dark (const xtd::drawing::color &base_color, double perc_of_dark_dark) |
Creates a new dark color object for the control from the specified color and darkens it by the specified percentage. | |
static xtd::drawing::color | dark_dark (const xtd::drawing::color &base_color) |
Creates a new dark color object for the control from the specified color. | |
static void | draw_button (xtd::drawing::graphics &graphics, const xtd::drawing::rectangle &rectangle, xtd::forms::button_state state) |
static void | draw_button (xtd::drawing::graphics &graphics, int32_t x, int32_t y, int32_t width, int32_t height, xtd::forms::button_state state) |
static void | draw_image (xtd::drawing::graphics &graphics, const xtd::drawing::image &image, const xtd::drawing::rectangle &rectangle, xtd::forms::image_layout image_layout) |
Draws the specified image in a specified rectangle with specified layout. | |
static void | draw_image (xtd::drawing::graphics &graphics, const xtd::drawing::image &image, int32_t x, int32_t y, int32_t width, int32_t height, xtd::forms::image_layout image_layout) |
Draws the specified image in a specified rectangle with specified layout. | |
static void | draw_image_disabled (xtd::drawing::graphics &graphics, const xtd::drawing::image &image, const xtd::drawing::point &location, const xtd::drawing::color &background) |
Draws the specified image in a disabled state. | |
static void | draw_image_disabled (xtd::drawing::graphics &graphics, const xtd::drawing::image &image, const xtd::drawing::point &location, float brightness) |
Draws the specified image in a disabled state. | |
static void | draw_image_disabled (xtd::drawing::graphics &graphics, const xtd::drawing::image &image, int32_t x, int32_t y, const xtd::drawing::color &background) |
Draws the specified image in a disabled state. | |
static void | draw_image_disabled (xtd::drawing::graphics &graphics, const xtd::drawing::image &image, int32_t x, int32_t y, float brightness) |
Draws the specified image in a disabled state. | |
static xtd::drawing::color | light (const xtd::drawing::color &base_color) |
Creates a new light color object for the control from the specified color. | |
static xtd::drawing::color | light (const xtd::drawing::color &base_color, double perc_of_light_light) |
Creates a new light color object for the control from the specified color and lightens it by the specified percentage. | |
static xtd::drawing::color | light_light (const xtd::drawing::color &base_color) |
Creates a new light color object for the control from the specified color. | |
static xtd::drawing::string_format | string_format (xtd::forms::text_format_flags flags) |
Convert xtd::forms::text_format_flags to xtd::drawing::string_format. | |
|
inlinestatic |
Returns the weighted average color between the two given colors.
color1 | The first color. |
color2 | The second color. |
weight | The weighting factor |
|
inlinestatic |
Returns the weighted average color between the two given colors.
color1 | The first color. |
color2 | The second color. |
weight | The weighting factor |
average_alpha | if true alpha was compute to; otherwise the alpha result is the alpha of color1 |
|
inlinestatic |
Creates a new dark color object for the control from the specified color.
color | The xtd::drawing::color to be darkened. |
|
inlinestatic |
Creates a new dark color object for the control from the specified color and darkens it by the specified percentage.
color | The xtd::drawing::color to be darkened. |
perc_of_dark | The percentage to darken the specified xtd::drawing::color. |
|
inlinestatic |
Creates a new dark color object for the control from the specified color.
color | The xtd::drawing::color to be darkened. |
|
inlinestatic |
Draws the specified image in a specified rectangle with specified layout.
xtd::drawing::graphics | The Graphics to draw on. |
image | The xtd::drawing::image to draw. |
rectangle | xtd::drawing::rectangle structure that defines the rectangle of the drawn image. |
image_layout | One of the values of xtd::forms::image_layout (center , none, stretch, tile, or zoom). |
|
static |
Draws the specified image in a specified rectangle with specified layout.
xtd::drawing::graphics | The Graphics to draw on. |
image | The xtd::drawing::image to draw. |
x | The x-coordinate of the top left of the drawn image. |
y | The y-coordinate of the top left of the drawn image. |
width | The width of the drawn image. |
height | The height of the drawn image. |
image_layout | One of the values of xtd::forms::image_layout (center , none, stretch, tile, or zoom). |
|
inlinestatic |
Draws the specified image in a disabled state.
xtd::drawing::graphics | The Graphics to draw on. |
image | The xtd::drawing::image to draw. |
location | The xtd::drawing::point of the top left of the border image. |
background | The xtd::drawing::color of the background behind the image. |
|
inlinestatic |
Draws the specified image in a disabled state.
xtd::drawing::graphics | The Graphics to draw on. |
image | The xtd::drawing::image to draw. |
location | The xtd::drawing::point of the top left of the border image. |
brightness | The brightness (between 0.0 and 1.0 for drawing image disabled. |
|
inlinestatic |
Draws the specified image in a disabled state.
xtd::drawing::graphics | The Graphics to draw on. |
image | The xtd::drawing::image to draw. |
x | The x-coordinate of the top left of the border image. |
y | The y-coordinate of the top left of the border image. |
background | The xtd::drawing::color of the background behind the image. |
|
static |
Draws the specified image in a disabled state.
xtd::drawing::graphics | The Graphics to draw on. |
image | The xtd::drawing::image to draw. |
x | The x-coordinate of the top left of the border image. |
y | The y-coordinate of the top left of the border image. |
brightness | The brightness (between 0.0 and 1.0 for drawing image disabled. |
|
inlinestatic |
Creates a new light color object for the control from the specified color.
color | The xtd::drawing::color to be lightened. |
|
inlinestatic |
Creates a new light color object for the control from the specified color and lightens it by the specified percentage.
color | The xtd::drawing::color to be lightened. |
perc_of_light | The percentage to lighten the specified xtd::drawing::color. |
|
inlinestatic |
Creates a new light color object for the control from the specified color.
color | The xtd::drawing::color to be lightened. |
|
inlinestatic |
Convert xtd::forms::text_format_flags to xtd::drawing::string_format.
flags | a text_format_flags to convert. |