xtd 0.2.0
Loading...
Searching...
No Matches
brush.h
1#pragma once
3#if !defined(__XTD_DRAWING_NATIVE_LIBRARY__)
4#error "Do not include this file: Internal use only"
5#endif
7
8#include <cstdint>
9#include <tuple>
10#include <vector>
11#include <xtd/static.h>
12#include <xtd/types.h>
13#include <xtd/drawing_native_export.h>
14
16namespace xtd {
18 namespace drawing {
20 namespace drawing_2d {
21 class hatch_brush;
22 class conical_gradient_brush;
23 class linear_gradient_brush;
24 class radial_gradient_brush;
25 }
26 class brush;
27 class solid_brush;
28 class texture_brush;
30
33 namespace native {
41 class drawing_native_export_ brush final static_ {
49 protected:
51
56 static intptr create();
57
61 static void destroy(intptr brush);
62
71
81 static void conical_gradient(intptr brush, int32 center_x, int32 center_y, const std::vector<std::tuple<xtd::byte, xtd::byte, xtd::byte, xtd::byte, float>>& colors, float angle);
82
92 static void linear_gradient(intptr brush, int32 x1, int32 y1, int32 x2, int32 y2, const std::vector<std::tuple<xtd::byte, xtd::byte, xtd::byte, xtd::byte, float>>& colors, float angle);
93
104 static void radial_gradient(intptr brush, int32 center_x, int32 center_y, int32 focal_x, int32 focal_y, const std::vector<std::tuple<xtd::byte, xtd::byte, xtd::byte, xtd::byte, float>>& colors, float radius);
105
109 static void texture(intptr brush, intptr texture);
111 };
112 }
113 }
114}
Defines objects used to fill the interiors of graphical shapes such as rectangles,...
Definition brush.h:33
colors for all the standard colors. This class cannot be inherited.
Definition colors.h:26
Encapsulates a xtd::drawing::brush with a conical gradient. This class cannot be inherited.
Definition conical_gradient_brush.h:35
Defines a rectangular xtd::drawing::brush with a hatch style, a foreground color, and a background co...
Definition hatch_brush.h:32
Encapsulates a xtd::drawing::brush with a linear gradient. This class cannot be inherited.
Definition linear_gradient_brush.h:31
Encapsulates a xtd::drawing::brush with a radial gradient. This class cannot be inherited.
Definition radial_gradient_brush.h:30
Contains brush native API.
Definition brush.h:41
static intptr create()
Creates brush.
static void linear_gradient(intptr brush, int32 x1, int32 y1, int32 x2, int32 y2, const std::vector< std::tuple< xtd::byte, xtd::byte, xtd::byte, xtd::byte, float > > &colors, float angle)
Sets linear gradient brush.
static void radial_gradient(intptr brush, int32 center_x, int32 center_y, int32 focal_x, int32 focal_y, const std::vector< std::tuple< xtd::byte, xtd::byte, xtd::byte, xtd::byte, float > > &colors, float radius)
Sets radial gradient brush.
static void destroy(intptr brush)
Destroys brush.
static void texture(intptr brush, intptr texture)
Sets texturebrush.
static void conical_gradient(intptr brush, int32 center_x, int32 center_y, const std::vector< std::tuple< xtd::byte, xtd::byte, xtd::byte, xtd::byte, float > > &colors, float angle)
Sets conical gradient brush.
static void solid(intptr brush, xtd::byte a, xtd::byte r, xtd::byte g, xtd::byte b)
Sets solid color brush.
Defines a xtd::drawing::brush of a single color. Brushes are used to fill graphics shapes,...
Definition solid_brush.h:30
Each property of the xtd::drawing::texture_brush class is a xtd::drawing::brush object that uses an i...
Definition texture_brush.h:29
#define static_
This keyword is use to represent a static object. A static object can't be instantiated (constructors...
Definition static.h:37
int32_t int32
Represents a 32-bit signed integer.
Definition int32.h:23
intmax_t intptr
Represent a pointer or a handle.
Definition intptr.h:23
uint8_t byte
Represents a 8-bit unsigned integer.
Definition byte.h:23
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10
Contains xtd::static_object class.
Contains xtd fundamental types.