xtd 0.2.0
Loading...
Searching...
No Matches
xtd::drawing::native::brush Class Referencefinal
Inheritance diagram for xtd::drawing::native::brush:
xtd::static_object

Definition

Contains brush native API.

Namespace
xtd::drawing::native
Library
xtd.drawing.native
Warning
Internal use only

Protected Static Methods

static intptr create ()
 Creates brush.
 
static void destroy (intptr brush)
 Destroys brush.
 
static void solid (intptr brush, xtd::byte a, xtd::byte r, xtd::byte g, xtd::byte b)
 Sets solid color brush.
 
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 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 texture (intptr brush, intptr texture)
 Sets texturebrush.
 

Member Function Documentation

◆ create()

static intptr xtd::drawing::native::brush::create ( )
staticprotected

Creates brush.

Returns
The created brush handle.
Warning
Internal use only

◆ destroy()

static void xtd::drawing::native::brush::destroy ( intptr  brush)
staticprotected

Destroys brush.

Parameters
brushThe brush handle to destroy.
Warning
Internal use only

◆ solid()

static void xtd::drawing::native::brush::solid ( intptr  brush,
xtd::byte  a,
xtd::byte  r,
xtd::byte  g,
xtd::byte  b 
)
staticprotected

Sets solid color brush.

Parameters
brushThe brush handle.
aThe alpha component of the color.
rThe red component of the color.
gThe green component of the color.
bThe blue component of the color.
Warning
Internal use only

◆ conical_gradient()

static void xtd::drawing::native::brush::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 
)
staticprotected

Sets conical gradient brush.

Parameters
brushThe brush handle.
center_xThe x coordinate of the center point.
center_yThe y coordinate of the center point.
colorsThe gradient stop colors. Contains color and offset.
angleThe start angle of the conical gradient.
Remarks
An offset value of 0.0 specifies that the stop is positioned at the beginning of the gradient vector, while a value of 1.0 specifies that the stop is positioned at the end of the gradient vector.
The angle rotates in the clockwise direction. An angle of O° represents an angle from the center to the left. The angle turns in the clockwise direction. An angle of 90° represents an angle from the center downwards. An angle of 180° represents an angle from the center to the right. And so on.
Warning
Internal use only

◆ linear_gradient()

static void xtd::drawing::native::brush::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 
)
staticprotected

Sets linear gradient brush.

x1 Contains the left value of the bound rectangle of the linear brush.

y1 Contains the top value of the bound rectangle of the linear brush.

x2 Contains the right value of the bound rectangle of the linear brush.

y1 Contains the bottom value of the bound rectangle of the linear brush.

Parameters
angleThe start angle of the linear gradient.
Remarks
An offset value of 0.0 specifies that the stop is positioned at the beginning of the gradient vector, while a value of 1.0 specifies that the stop is positioned at the end of the gradient vector.
The angle rotates in the clockwise direction. An angle of O° represents an angle from the center to the left. The angle turns in the clockwise direction. An angle of 90° represents an angle from the center downwards. An angle of 180° represents an angle from the center to the right. And so on.
Warning
Internal use only

◆ radial_gradient()

static void xtd::drawing::native::brush::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 
)
staticprotected

Sets radial gradient brush.

Parameters
brushThe brush handle.
center_xThe x coordinate of the center point.
center_yThe y coordinate of the center point.
focal_xThe x coordinate of the focal point.
focal_yThe y coordinate of the focal point.
colorsThe gradient stop colors. Contains color and offset.
radiusThe radius of the radial gradient.
Remarks
An offset value of 0.0 specifies that the stop is positioned at the beginning of the gradient vector, while a value of 1.0 specifies that the stop is positioned at the end of the gradient vector.
Warning
Internal use only

◆ texture()

static void xtd::drawing::native::brush::texture ( intptr  brush,
intptr  texture 
)
staticprotected

Sets texturebrush.

Parameters
brushThe brush handle.
textureThe image handle that represents the texture of the brush.

The documentation for this class was generated from the following file: