#include <hatch_brush.h>
Defines a rectangular xtd::drawing::brush with a hatch style, a foreground color, and a background color. This class cannot be inherited.
- Namespace
- xtd::drawing::drawing2d
- Library
- xtd.drawing
- Examples
- The following code example demonstrates the use of hatch_brush class.
#include <xtd/xtd>
namespace examples {
class form1 :
public form {
public:
form1() {
text("Fill rectangle example");
client_size({680, 340});
}
protected:
form::on_paint(e);
e.
graphics().
fill_rectangle(
linear_gradient_brush {
rectangle {180, 180, 150, 150}, back_color, fore_color, 315},
rectangle {180, 180, 150, 150});
}
private:
image create_circle_texture(
const color& fore_color,
const color& back_color) {
auto texture =
bitmap {16, 16};
auto graphics = texture.create_graphics();
return texture;
}
};
}
int main() {
application::run(examples::form1 {});
}
- Examples:
- color_picker.cpp, and fill_rectangle.cpp.
|
intptr_t | handle () const |
| Gets the handle of the brush. More...
|
|
xtd::ustring | to_string () const noexcept override |
| Converts this brush object to a human-readable string. More...
|
|
| object ()=default |
| Create a new instance of the ultimate base class object. More...
|
|
virtual bool | equals (const object &obj) const noexcept |
| Determines whether the specified object is equal to the current object. More...
|
|
virtual size_t | get_hash_code () const noexcept |
| Serves as a hash function for a particular type. More...
|
|
template<typename object_t > |
std::unique_ptr< object_t > | memberwise_clone () const |
| Gets the type of the current instance. More...
|
|
static bool | equals (const object &object_a, const object &object_b) noexcept |
| Determines whether the specified object instances are considered equal. More...
|
|
static bool | reference_equals (const object &object_a, const object &object_b) noexcept |
| Determines whether the specified object instances are the same instance. More...
|
|
| brush () |
| Initialize a new instance of brush class. More...
|
|
void | set_native_brush (intptr_t brush) |
| In a derived class, sets a reference to a GDI+ brush object. More...
|
|
◆ hatch_brush() [1/2]
◆ hatch_brush() [2/2]
◆ background_color()
◆ foreground_color()
◆ hatch_style()
The documentation for this class was generated from the following file: