Merge pull request #112 from asajeffrey/geometry-perspective-post-mul

Add Perspective::post_mul
This commit is contained in:
Patrick Walton 2019-03-20 14:26:11 -07:00 committed by GitHub
commit a0aeb124ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

View File

@ -282,6 +282,14 @@ impl Perspective {
let max_point = upper_left.max(upper_right).max(lower_left).max(lower_right); let max_point = upper_left.max(upper_right).max(lower_left).max(lower_right);
RectF32::from_points(min_point, max_point) RectF32::from_points(min_point, max_point)
} }
#[inline]
pub fn post_mul(&self, other: &Transform3DF32) -> Perspective {
Perspective {
transform: self.transform.post_mul(other),
window_size: self.window_size,
}
}
} }
/// Transforms a path with a perspective projection. /// Transforms a path with a perspective projection.