Fixed import issue with canvas in the gradient mod for situations where canvas feature is not enabled.

This commit is contained in:
shan 2022-10-07 16:28:13 -07:00
parent 215e6c95be
commit a4a1262fa2
5 changed files with 27 additions and 33 deletions

View file

@ -38,12 +38,11 @@ pub(crate) struct Transform {
impl Transform {
/// Transforms the given [Point] by the transformation matrix.
pub(crate) fn transform_point(&self, mut point: Point) -> Point {
pub(crate) fn transform_point(&self, point: &mut Point) {
let transformed =
self.raw.transform_point(Point2D::new(point.x, point.y));
point.x = transformed.x;
point.y = transformed.y;
point
}
}