#[non_exhaustive]pub struct DrawRectangleArgs {}experimental only.Expand description
This structure describes the properties of a rectangle for blending with TargetPixelBuffer::draw_rectangle.
All the coordinate are in physical pixels
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.x: f32The x position in the destination buffer
y: f32The y position in the destination buffer
width: f32The width of the image in the destination.
height: f32The height of the image in the destination.
top_left_radius: f32The top-left radius.
top_right_radius: f32The top-right radius.
bottom_right_radius: f32The bottom-right radius.
bottom_left_radius: f32The bottom-left radius.
border_width: f32The width of the border.
background: BrushThe background of the rectangle
border: BrushThe border of the rectangle
alpha: u8A value between 0 and 255 that specifies the opacity. A value of 0 would mean that the rectangle is fully transparent (so nothing is drawn), and a value of 255 would mean fully opaque. Note that the brush also might have an alpha value and the two values should be combined.
rotation: RenderingRotationAn extra rotation that should be applied to the gradient (and only to the gradient, it doesn’t impact the border radius)