Skip to content

Instantly share code, notes, and snippets.

@matanlurey
Created July 17, 2020 00:40
Show Gist options
  • Save matanlurey/7f19934aa5056c2a04c1b5881780e9ec to your computer and use it in GitHub Desktop.
Save matanlurey/7f19934aa5056c2a04c1b5881780e9ec to your computer and use it in GitHub Desktop.
@JS()
library canvaskit;
import 'package:js/js.dart';
@JS('flutter_canvas_kit.SkPath')
@anonymous
abstract class SkPath {
external factory SkPath([SkPath? other]);
@JS('arcTo')
external void _arcTo(
Object a,
Object b,
Object c,
Object d, [
Object e,
Object f,
Object g,
]);
}
extension SkPathOverloads on SkPath {
void arcTo(double x1, double y1, double x2, double y2, double radius) {
_arcTo(x1, y1, x2, y2, radius);
}
void arcToOval(SkRect oval, double startAngle, double sweepAngle, double forceMoveTo) {
_arcTo(oval, startAngle, sweepAngle, forceMoveTo);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment