Remove PaintingCanvas

We can just use Canvas now.  The two are the same thing.
This commit is contained in:
Adam Barth
2015-12-04 20:26:08 -08:00
parent b6cf053e89
commit abf0359569
22 changed files with 33 additions and 39 deletions

View File

@@ -139,7 +139,7 @@ abstract class RenderDecoratedSector extends RenderSector {
return;
if (_decoration.backgroundColor != null) {
final PaintingCanvas canvas = context.canvas;
final Canvas canvas = context.canvas;
Paint paint = new Paint()..color = _decoration.backgroundColor;
Path path = new Path();
double outerRadius = (parentData.radius + deltaRadius);

View File

@@ -62,7 +62,7 @@ class RenderTouchDemo extends RenderBox {
}
void paint(PaintingContext context, Offset offset) {
final PaintingCanvas canvas = context.canvas;
final Canvas canvas = context.canvas;
Paint white = new Paint()
..color = const Color(0xFFFFFFFF);
canvas.drawRect(offset & size, white);

View File

@@ -10,7 +10,7 @@ class StockArrowPainter extends CustomPainter {
final Color color;
final double percentChange;
void paint(PaintingCanvas canvas, Size size) {
void paint(Canvas canvas, Size size) {
Paint paint = new Paint()..color = color;
paint.strokeWidth = 1.0;
const double padding = 2.0;

View File

@@ -30,7 +30,7 @@ class _GesturePainter extends CustomPainter {
final bool doubleTapEnabled;
final bool longPressEnabled;
void paint(PaintingCanvas canvas, Size size) {
void paint(Canvas canvas, Size size) {
Point center = (size.center(Point.origin).toOffset() * zoom + offset).toPoint();
double radius = size.width / 2.0 * zoom;
Gradient gradient = new RadialGradient(

View File

@@ -28,7 +28,7 @@ class _MarkerPainter extends CustomPainter {
final double size;
final MarkerType type;
void paint(PaintingCanvas canvas, _) {
void paint(Canvas canvas, _) {
Paint paint = new Paint()..color = const Color(0x8000FF00);
double r = size / 2.0;
canvas.drawCircle(new Point(r, r), r, paint);