[][src]Function photon::text::draw_text_with_border

pub fn draw_text_with_border(
    photon_img: &mut PhotonImage,
    text: &str,
    x: u32,
    y: u32
)

Add bordered-text to an image. The only font available as of now is Roboto. Note: A graphic design/text-drawing library is currently being developed, so stay tuned.

Arguments

Example

// For example to draw the string "Welcome to Photon!" at 10, 10:
use photon::text::draw_text_with_border;
 
// Open the image. A PhotonImage is returned.
let img: PhotonImage = open_image("images/cats.PNG");
 
draw_text_with_border(&mut img, "Welcome to Photon!", 10, 10);