INNER CODE UNIT · Rust

set_origin

lemunozm/ruscii · src/drawing.rs:216

    pub fn set_origin(&mut self, position: Vec2) -> &mut Pencil<'a> {
        self.origin = position;
        self
    }

    /// Moves the origin by the given `displacement`.
    pub fn move_origin(&mut self, displacement: Vec2) -> &mut Pencil<'a> {
        self.origin += displacement;
        self
    }

    pub fn set_foreground(&mut self, color: Color) -> &mut Pencil<'a> {
        self.foreground = color;
        self
    }

    pub fn set_background(&mut self, color: Color) -> &mut Pencil<'a> {
        self.background = color;

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…