pub fn draw_text<'a, I>(
    image: &'a mut I,
    color: I::Pixel,
    x: i32,
    y: i32,
    scale: Scale,
    font: &'a Font<'a>,
    text: &'a str,
) -> Image<I::Pixel>
where
    I: GenericImage,
    <I::Pixel as Pixel>::Subpixel: ValueInto<f32> + Clamp<f32>,
    I::Pixel: 'static,
{
    let mut out = ImageBuffer::new(image.width(), image.height());
    out.copy_from(image, 0, 0).unwrap();
    draw_text_mut(&mut out, color, x, y, scale, font, text);
    out
}
/// Draws colored text on an image in place. `scale` is augmented font scaling on both the x and y axis (in pixels). Note that this function *does not* support newlines, you must do this manually.
Draws colored text on an image in place. `scale` is augmented font scaling on both the x and y axis (in pixels). Note that this function *does not* support newlines, you must do this manually.
Draws colored text on an image in place . ` scale ` is augmented font scaling on both the x and y axis ( in pixels ) . Note that this function * does not * support newlines you must do this manually .
pub fn draw_text<'a, I>(
    image: &'a mut I,
    color: I::Pixel,
    x: i32,
    y: i32,
    scale: Scale,
    font: &'a Font<'a>,
    text: &'a str,
) -> Image<I::Pixel>
where
    I: GenericImage,
    <I::Pixel as Pixel>::Subpixel: ValueInto<f32> + Clamp<f32>,
    I::Pixel: 'static,
{
    let mut out = ImageBuffer::new(image.width(), image.height());
    out.copy_from(image, 0, 0).unwrap();
    draw_text_mut(&mut out, color, x, y, scale, font, text);
    out
}
pub fn draw_text < ' a , I > ( image : & ' a mut I , color : I :: Pixel , x : i32 , y : i32 , scale : Scale , font : & ' a Font < ' a > , text : & ' a str , ) -> Image < I :: Pixel > where I : GenericImage , < I :: Pixel as Pixel > :: Subpixel : ValueInto < f32 > + Clamp < f32 > , I :: Pixel : ' static , { let mut out = ImageBuffer :: new ( image . width ( ) , image . height ( ) ) ; out . copy_from ( image , 0 , 0 ) . unwrap ( ) ; draw_text_mut ( & mut out , color , x , y , scale , font , text ) ; out }
Draws colored text on an image in place.
Draws colored text on an image in place .
image
&'a mut I
color
I::Pixel
x
i32
y
i32
scale
Scale
font
&'a Font<'a>
text
&'a str
image
&'a mut I
color
I::Pixel
x
i32
y
i32
scale
Scale
font
&'a Font<'a>
text
&'a str