未验证 提交 dee0a224 编写于 作者: T Todd Volkert 提交者: GitHub

Support single-argument signature in Canvas.scale() (#5334)

上级 fc0b9a67
......@@ -2756,7 +2756,12 @@ class Canvas extends NativeFieldWrapperClass2 {
/// Add an axis-aligned scale to the current transform, scaling by the first
/// argument in the horizontal direction and the second in the vertical
/// direction.
void scale(double sx, double sy) native 'Canvas_scale';
///
/// If [sy] is unspecified, [sx] will be used for the scale in both
/// directions.
void scale(double sx, [double sy]) => _scale(sx, sy ?? sx);
void _scale(double sx, double sy) native 'Canvas_scale';
/// Add a rotation to the current transform. The argument is in radians clockwise.
void rotate(double radians) native 'Canvas_rotate';
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册