Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F91619725
linePainter.Dart
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Tue, Nov 12, 19:23
Size
827 B
Mime Type
text/x-c++
Expires
Thu, Nov 14, 19:23 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
22294486
Attached To
R10646 Orchestration
linePainter.Dart
View Options
import 'package:flutter/material.dart';
class LinePainter2 extends CustomPainter {
Paint _paint;
List<double> x;
List<double> y;
var path = Path();
//var patendpathh=path();
LinePainter2(this.x, this.y) {
_paint = Paint()
..color = Colors.blue
..strokeWidth = 3.0
..style = PaintingStyle.stroke;
}
@override
void paint(Canvas canvas, Size size) {
// path.moveTo(0, 0);
//canvas.restore();
// print(x);
for (int i = 3; i < x.length - 3; i++) {
path.moveTo(x[i - 2], y[i - 2]);
path.lineTo(x[i - 1], y[i - 1]);
canvas.drawPath(path, _paint);
// canvas.save();
}
// path.moveTo(0, 0);
//path.lineTo(20, 20);
//canvas.drawPath(path, _paint);
}
@override
bool shouldRepaint(LinePainter2 oldDelegate) {
return true;
}
}
Event Timeline
Log In to Comment