pub struct Affine {
pub a: f32,
pub b: f32,
pub c: f32,
pub d: f32,
pub e: f32,
pub f: f32,
}Expand description
x' = a·x + c·y + e, y' = b·x + d·y + f (a ordem do matrix(a b c d e f) do SVG).
Fields§
§a: f32§b: f32§c: f32§d: f32§e: f32§f: f32Implementations§
Source§impl Affine
impl Affine
pub const IDENTITY: Affine
pub fn new(a: f32, b: f32, c: f32, d: f32, e: f32, f: f32) -> Self
pub fn translate(x: f32, y: f32) -> Self
pub fn scale(x: f32, y: f32) -> Self
pub fn skew_x(degrees: f32) -> Self
pub fn skew_y(degrees: f32) -> Self
pub fn apply(&self, p: PointF) -> PointF
Sourcepub fn scale_factor(&self) -> f32
pub fn scale_factor(&self) -> f32
Quanto a transformação aumenta uma medida (largura de traço, raio).
pub fn path(&self, path: &Path) -> Path
Sourcepub fn rect_to_rect(from: RectF, to: RectF) -> Affine
pub fn rect_to_rect(from: RectF, to: RectF) -> Affine
Leva o retângulo from (conteúdo) para to (tela).
Trait Implementations§
impl Copy for Affine
impl StructuralPartialEq for Affine
Auto Trait Implementations§
impl Forget for Affine
impl Freeze for Affine
impl Move for Affine
impl RefUnwindSafe for Affine
impl Send for Affine
impl Sync for Affine
impl Unpin for Affine
impl UnsafeUnpin for Affine
impl UnwindSafe for Affine
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more