[−][src]Function gdl::elements::draw_gradient_rect
pub fn draw_gradient_rect(
img: &mut DynamicImage,
height: u32,
width: u32,
x_pos: u32,
y_pos: u32
)
Draw a solid rectangle with a given background colour. Draw a rectangle filled with a gradient.
Arguments
img
- A mutable ref to a DynamicImage.text
- Text to be placed inside the rectangle.background_color
- Rgb color of rectangle.width
- u32 - Desired width of gradient rectangle.height
- u32 - Desired height of gradient rectangle.x_pos
- X-coordinate of top corner of rectangle onimg
y_pos
- y-coordinate of top corner of rectangle onimg