<commit_before>#![feature(std_misc, io)]

extern crate graphics;
extern crate glium;
extern crate glutin;
extern crate glium_graphics;
extern crate image;


fn main() {
    use std::old_io::timer::sleep;
    use std::old_io::BufReader;
    use std::time::duration::Duration;
    use glium::{DisplayBuild, Surface, Texture2d};
    use glium_graphics::{GliumBackendSystem, GliumSurfaceBackEnd, DrawTexture};
    use graphics::{Context, RelativeTransform};

    let display = glutin::WindowBuilder::new()
        .with_dimensions(300, 300)
        .with_title(format!("Image test"))
        .build_glium().unwrap();

    let rust_logo = DrawTexture::new({
        let image =
            image::load(
                BufReader::new(include_bytes!("../assets/rust.png")),
                image::PNG
            ).unwrap();
        Texture2d::new(&display, image)
    });

    let mut system = GliumBackendSystem::new(&display);

    loop {
        let mut target = display.draw();
        {
            let mut backend = GliumSurfaceBackEnd::new(&mut system, &mut target);
            let context = Context::abs(300.0, 300.0);
            graphics::clear([1.0; 4], &mut backend);
            graphics::Rectangle::new([1.0, 0.0, 0.0, 1.0])
                .draw([0.0, 0.0, 100.0, 100.0], &context, &mut backend);
            graphics::Rectangle::new([0.0, 1.0, 0.0, 0.3])
                .draw(
                    [50.0, 50.0, 100.0, 100.0],
                    &context,
                    &mut backend
                );
            graphics::image(&rust_logo, &context.trans(100.0, 100.0), &mut backend);
        }
        target.finish();
        sleep(Duration::milliseconds(15));
    }
}<commit_msg>Upgraded image_test to use new names<commit_after>#![feature(std_misc, io)]

extern crate graphics;
extern crate glium;
extern crate glutin;
extern crate glium_graphics;
extern crate image;


fn main() {
    use std::old_io::timer::sleep;
    use std::old_io::BufReader;
    use std::time::duration::Duration;
    use glium::{DisplayBuild, Surface, Texture2d};
    use glium_graphics::{Glium2d, GliumGraphics, DrawTexture};
    use graphics::{Context, RelativeTransform};

    let display = glutin::WindowBuilder::new()
        .with_dimensions(300, 300)
        .with_title(format!("Image test"))
        .build_glium().unwrap();

    let rust_logo = DrawTexture::new({
        let image =
            image::load(
                BufReader::new(include_bytes!("../assets/rust.png")),
                image::PNG
            ).unwrap();
        Texture2d::new(&display, image)
    });

    let mut g2d = Glium2d::new(&display);

    loop {
        let mut target = display.draw();
        {
            let mut g = GliumGraphics::new(&mut g2d, &mut target);
            let context = Context::abs(300.0, 300.0);
            graphics::clear([1.0; 4], &mut g);
            graphics::Rectangle::new([1.0, 0.0, 0.0, 1.0])
                .draw([0.0, 0.0, 100.0, 100.0], &context, &mut g);
            graphics::Rectangle::new([0.0, 1.0, 0.0, 0.3])
                .draw(
                    [50.0, 50.0, 100.0, 100.0],
                    &context,
                    &mut g
                );
            graphics::image(&rust_logo, &context.trans(100.0, 100.0), &mut g);
        }
        target.finish();
        sleep(Duration::milliseconds(15));
    }
}
{'fraction_non_alphanumeric': 0.15490020851951147, 'fraction_numerical': 0.043491212392016684, 'mean_word_length': 2.150093808630394, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5683101', 'n_tokens_mistral': 1161, 'n_tokens_neox': 1037, 'n_words': 223}