INNER CODE UNIT · Rust
set_foreground
lemunozm/ruscii · src/drawing.rs:227
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;
self
}
pub fn set_style(&mut self, style: Style) -> &mut Pencil<'a> {
self.style = style;
self
}
/// Draws a character at the given `position` according to the previously set text style options.
///
/// Returns the receiver for chaining.