Trait kludgine::DrawableExt

source ·
pub trait DrawableExt<Source, Unit> {
    // Required methods
    fn translate_by(self, point: Point<Unit>) -> Drawable<Source, Unit>;
    fn rotate_by(self, angle: Angle) -> Drawable<Source, Unit>;
    fn scale(self, factor: f32) -> Drawable<Source, Unit>;
    fn opacity(self, opacity: f32) -> Drawable<Source, Unit>;
}
Expand description

Translation, rotation, and scaling for drawable types.

Required Methods§

source

fn translate_by(self, point: Point<Unit>) -> Drawable<Source, Unit>

Translates self by point.

source

fn rotate_by(self, angle: Angle) -> Drawable<Source, Unit>

Rotates self by angle.

source

fn scale(self, factor: f32) -> Drawable<Source, Unit>

Scales self by factor.

source

fn opacity(self, opacity: f32) -> Drawable<Source, Unit>

Renders this drawable with opacity, ranged from 0.- to 1.0.

Implementors§

source§

impl<T, Unit> DrawableExt<T, Unit> for Drawable<T, Unit>

source§

impl<T, Unit> DrawableExt<T, Unit> for T
where Drawable<T, Unit>: From<T>, Unit: Default,