Struct rich_sdl2_rust::renderer::pen::Pen
source · pub struct Pen<'renderer> { /* private fields */ }
Expand description
A pen controls its color and renders geometries to the renderer.
Implementations§
source§impl<'renderer> Pen<'renderer>
impl<'renderer> Pen<'renderer>
sourcepub fn new(renderer: &'renderer Renderer<'_>) -> Self
pub fn new(renderer: &'renderer Renderer<'_>) -> Self
Constructs a pen from the renderer Renderer
.
sourcepub fn blend_mode(&self) -> BlendMode
pub fn blend_mode(&self) -> BlendMode
Returns the current color blend mode.
sourcepub fn set_blend_mode(&self, mode: BlendMode)
pub fn set_blend_mode(&self, mode: BlendMode)
Sets the color blend mode.
sourcepub fn lines(&self, points: impl IntoIterator<Item = Point>)
pub fn lines(&self, points: impl IntoIterator<Item = Point>)
Draws the lines.
sourcepub fn points(&self, points: impl IntoIterator<Item = Point>)
pub fn points(&self, points: impl IntoIterator<Item = Point>)
Draw the points.
sourcepub fn stroke_rect(&self, rect: Rect)
pub fn stroke_rect(&self, rect: Rect)
Draw the rectangle only lines.
sourcepub fn stroke_rects(&self, rects: impl IntoIterator<Item = Rect>)
pub fn stroke_rects(&self, rects: impl IntoIterator<Item = Rect>)
Draw the rectangles only lines.
sourcepub fn fill_rects(&self, rects: impl IntoIterator<Item = Rect>)
pub fn fill_rects(&self, rects: impl IntoIterator<Item = Rect>)
Draw the filled rectangles.