INNER CODE UNIT · Rust

draw_element

lemunozm/ruscii · src/drawing.rs:173

    fn draw_element(&mut self, position: Vec2, value: char) {
        if let Some(element) = self.canvas.elem_mut(position) {
            element.value = value;
            element.foreground = self.foreground;
            element.background = self.background;
            element.style = self.style;
        }
    }

    pub fn origin(&self) -> Vec2 {
        self.origin
    }

    /// Returns the dimensions of the positive drawable space past the current origin.
    ///
    /// ## Example
    ///
    /// ```rust

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…