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: impl ScaleFactor) -> Drawable<Source, Unit>;
fn opacity(self, opacity: f32) -> Drawable<Source, Unit>;
}
Expand description
Translation, rotation, and scaling for drawable types.
Required Methods§
Sourcefn translate_by(self, point: Point<Unit>) -> Drawable<Source, Unit>
fn translate_by(self, point: Point<Unit>) -> Drawable<Source, Unit>
Translates self
by point
.
Sourcefn scale(self, factor: impl ScaleFactor) -> Drawable<Source, Unit>
fn scale(self, factor: impl ScaleFactor) -> Drawable<Source, Unit>
Scales self
by factor
.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.