pub fn text<G: Graphics>(
    text: &str, p: &graphics::Polygon, c: &Context, gl: &mut G
) {
    let mut x = 0.0;
    let mut y = 0.0;
    let jump_x = 55.0;
    let jump_y = 80.0;
    for ch in text.chars() {
        let d = &c.trans(-17.0 + x, -24.0 + y);
        match ch {
            ' ' => {x += jump_x;},
            'a' => {a_letter(p, d, gl); x += jump_x;},
            'b' => {b_letter(p, d, gl); x += jump_x;},
            'd' => {d_letter(p, d, gl); x += jump_x;},
            'e' => {e_letter(p, d, gl); x += jump_x;},
            'i' => {i_letter(p, d, gl); x += jump_x;},
            'l' => {l_letter(p, d, gl); x += jump_x;},
            'n' => {n_letter(p, d, gl); x += jump_x;},
            'o' => {o_letter(p, d, gl); x += jump_x;},
            'r' => {r_letter(p, d, gl); x += jump_x;},
            's' => {s_letter(p, d, gl); x += jump_x;},
            't' => {t_letter(p, d, gl); x += jump_x;},
            'u' => {u_letter(p, d, gl); x += jump_x;},
            'w' => {w_letter(p, d, gl); x += jump_x;},
            'y' => {y_letter(p, d, gl); x += jump_x;},
            '\n' => {x = 0.0; y += jump_y;},
            ch => panic!("{} is not implemented!", ch),
        };
    }
}
/// Renders text filled with colors.
Renders text filled with colors.
Renders text filled with colors .
pub fn text<G: Graphics>(
    text: &str, p: &graphics::Polygon, c: &Context, gl: &mut G
) {
    let mut x = 0.0;
    let mut y = 0.0;
    let jump_x = 55.0;
    let jump_y = 80.0;
    for ch in text.chars() {
        let d = &c.trans(-17.0 + x, -24.0 + y);
        match ch {
            ' ' => {x += jump_x;},
            'a' => {a_letter(p, d, gl); x += jump_x;},
            'b' => {b_letter(p, d, gl); x += jump_x;},
            'd' => {d_letter(p, d, gl); x += jump_x;},
            'e' => {e_letter(p, d, gl); x += jump_x;},
            'i' => {i_letter(p, d, gl); x += jump_x;},
            'l' => {l_letter(p, d, gl); x += jump_x;},
            'n' => {n_letter(p, d, gl); x += jump_x;},
            'o' => {o_letter(p, d, gl); x += jump_x;},
            'r' => {r_letter(p, d, gl); x += jump_x;},
            's' => {s_letter(p, d, gl); x += jump_x;},
            't' => {t_letter(p, d, gl); x += jump_x;},
            'u' => {u_letter(p, d, gl); x += jump_x;},
            'w' => {w_letter(p, d, gl); x += jump_x;},
            'y' => {y_letter(p, d, gl); x += jump_x;},
            '\n' => {x = 0.0; y += jump_y;},
            ch => panic!("{} is not implemented!", ch),
        };
    }
}
pub fn text < G : Graphics > ( text : & str , p : & graphics :: Polygon , c : & Context , gl : & mut G ) { let mut x = 0.0 ; let mut y = 0.0 ; let jump_x = 55.0 ; let jump_y = 80.0 ; for ch in text . chars ( ) { let d = & c . trans ( - 17.0 + x , - 24.0 + y ) ; match ch { ' ' => { x += jump_x ; } , 'a' => { a_letter ( p , d , gl ) ; x += jump_x ; } , 'b' => { b_letter ( p , d , gl ) ; x += jump_x ; } , 'd' => { d_letter ( p , d , gl ) ; x += jump_x ; } , 'e' => { e_letter ( p , d , gl ) ; x += jump_x ; } , 'i' => { i_letter ( p , d , gl ) ; x += jump_x ; } , 'l' => { l_letter ( p , d , gl ) ; x += jump_x ; } , 'n' => { n_letter ( p , d , gl ) ; x += jump_x ; } , 'o' => { o_letter ( p , d , gl ) ; x += jump_x ; } , 'r' => { r_letter ( p , d , gl ) ; x += jump_x ; } , 's' => { s_letter ( p , d , gl ) ; x += jump_x ; } , 't' => { t_letter ( p , d , gl ) ; x += jump_x ; } , 'u' => { u_letter ( p , d , gl ) ; x += jump_x ; } , 'w' => { w_letter ( p , d , gl ) ; x += jump_x ; } , 'y' => { y_letter ( p , d , gl ) ; x += jump_x ; } , '\n' => { x = 0.0 ; y += jump_y ; } , ch => panic ! ( " " ch ) , } ; } }
Renders text filled with colors.
Renders text filled with colors .
text
&str
p
&graphics::Polygon
c
&Context
gl
&mut G
text
&str
p
&graphics::Polygon
c
&Context
gl
&mut G