Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var paint = Paint();
- var path1 = Path();
- path1.moveTo(size.width / 3, size.height * 3 / 4);
- path1.lineTo(size.width / 2, size.height * 5 / 6);
- path1.lineTo(size.width * 3 / 4, size.height * 4 / 6);
- paint.style = PaintingStyle.fill;
- path1.close();
- // var trans = Float64List(16);
- // var ma = Matrix4.fromFloat64List(trans);
- // ma.setIdentity();
- // canvas.drawRect(Rect.fromCircle(
- // center: new Offset(size.width / 3, size.height * 3 / 4),
- // radius: 100,
- // ), paint);
- // canvas.clipRect(Rect.fromCircle(
- // center: new Offset(size.width / 3, size.height * 3 / 4),
- // radius: 100,
- // ));
- var path2 = Path();
- path2.addRect(Rect.fromCircle(
- center: new Offset(size.width / 3, size.height * 3 / 4),
- radius: 100,
- ));
- paint.style = PaintingStyle.fill;
- path2.close();
- // paint.shader = RadialGradient(
- // colors: [
- // Colors.red,
- // Colors.blue,
- // ],
- // ).createShader(Rect.fromCircle(
- // center: new Offset(size.width / 3, size.height * 3 / 4),
- // radius: 180.0,
- // ));
- var path3 = Path.combine(PathOperation.difference, path1, path2);
- canvas.drawPath(path3, paint);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement