[−][src]Function gdl::elements::draw_rect_text
pub fn draw_rect_text(
img: &mut DynamicImage,
text: &str,
background_color: &Rgb,
height: u32,
width: u32,
x_pos: i32,
y_pos: i32
)
Draw a solid rectangle with text placed in-centre.
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 rectangle.height
- u32 - Desired height of rectangle.x_pos
- X-coordinate of top corner of rectangle onimg
y_pos
- y-coordinate of top corner of rectangle onimg