pub struct Painter { /* private fields */ }
Implementations
sourceimpl Painter
impl Painter
pub fn new() -> Painter
pub fn begin(&self, clear: bool, clear_color: Option<Color>)
pub fn end(&self)
pub fn flush(&self)
pub fn clear(&self, color: Option<Color>)
pub fn draw_image(&self, img: &Image, x: f32, y: f32)
pub fn draw_subimage(
&self,
img: &Image,
x: f32,
y: f32,
sx: f32,
sy: f32,
sw: f32,
sh: f32
)
pub fn draw_scaled_image(&self, img: &Image, dx: f32, dy: f32, dw: f32, dh: f32)
pub fn draw_scaled_subimage(
&self,
image: &Image,
sx: f32,
sy: f32,
sw: f32,
sh: f32,
dx: f32,
dy: f32,
dw: f32,
dh: f32
)
pub fn draw_rect(&self, x: f32, y: f32, width: f32, height: f32, strength: f32)
pub fn fill_rect(&self, x: f32, y: f32, width: f32, height: f32)
pub fn measure(&self, text: &str) -> Option<(f32, f32)>
pub fn draw_string(&self, text: &str, x: f32, y: f32)
pub fn draw_characters(
&self,
text: Vec<i32, Global>,
start: i32,
length: i32,
x: f32,
y: f32
)
pub fn draw_line(&self, x1: f32, y1: f32, x2: f32, y2: f32, strength: f32)
pub fn draw_video(&self, video: Video, x: f32, y: f32, width: f32, height: f32)
pub fn fill_triangle(
&self,
x1: f32,
y1: f32,
x2: f32,
y2: f32,
x3: f32,
y3: f32
)
pub fn color(&self) -> Color
pub fn set_color(&self, color: Color)
pub fn font(&self) -> Font
pub fn set_font(&self, font: Font)
pub fn font_size(&self) -> f32
pub fn set_font_size(&self, value: f32)
pub fn transformation(&self) -> Matrix3<f32>
pub fn push_transformation(&self, trans: Matrix3<f32>)
pub fn pop_transformation(&self) -> Matrix3<f32>
pub fn scale(&self, x: f32, y: f32) -> Matrix3<f32>
pub fn translate(&self, tx: f32, ty: f32) -> Matrix3<f32>
pub fn push_translation(&self, tx: f32, ty: f32)
pub fn rotate(&self, angle: f32, centerx: f32, centery: f32) -> Matrix3<f32>
pub fn push_rotation(&self, angle: f32, centerx: f32, centery: f32)
pub fn push_opacity(&self, opacity: f32)
pub fn pop_opacity(&self) -> f32
pub fn opacity(&self) -> f32
pub fn set_opacity(&self, opacity: f32)
pub fn scissor(&self, x: i32, y: i32, width: i32, height: i32)
pub fn disable_scissor(&self)
pub fn set_projection(&self, projection_matrix: Matrix4<f32>)
pub fn projection(&self) -> Matrix4<f32>
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Painter
impl Send for Painter
impl !Sync for Painter
impl Unpin for Painter
impl !UnwindSafe for Painter
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<'a, T, C, M> Inspect<'a, C, &'a C, M> for T
impl<'a, T, C, M> Inspect<'a, C, &'a C, M> for T
impl<'a, T, C, M> Inspect<'a, C, &'a mut C, M> for T
impl<'a, T, C, M> Inspect<'a, C, &'a mut C, M> for T
impl<Fr, To> IntoColor<To> for Fr where
To: FromColor<Fr>,
impl<Fr, To> IntoColor<To> for Fr where
To: FromColor<Fr>,
fn into_color(self) -> To
fn into_color(self) -> To
Convert into color
impl<T> Pointable for T
impl<T> Pointable for T
impl<T> SetParameter for T
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
Sets value
as a parameter of self
.