Merge pull request #1673 from abarth/rm_old_paint_setters
Remove old setFoo functions on Paint
This commit is contained in:
@@ -16,7 +16,7 @@ abstract class GameObject extends Node {
|
||||
Paint _paintDebug = new Paint()
|
||||
..color=new Color(0xffff0000)
|
||||
..strokeWidth = 1.0
|
||||
..setStyle(ui.PaintingStyle.stroke);
|
||||
..style = ui.PaintingStyle.stroke;
|
||||
|
||||
bool collidingWith(GameObject obj) {
|
||||
return (GameMath.distanceBetweenPoints(position, obj.position)
|
||||
|
||||
@@ -10,7 +10,7 @@ class PowerBar extends NodeWithSize {
|
||||
Paint _paintOutline = new Paint()
|
||||
..color = new Color(0xffffffff)
|
||||
..strokeWidth = 1.0
|
||||
..setStyle(ui.PaintingStyle.stroke);
|
||||
..style = ui.PaintingStyle.stroke;
|
||||
|
||||
void paint(PaintingCanvas canvas) {
|
||||
applyTransformForPivot(canvas);
|
||||
|
||||
@@ -36,9 +36,10 @@ void drawText(ui.Canvas canvas, String lh) {
|
||||
path.lineTo(block.maxContentWidth, block.alphabeticBaseline);
|
||||
path.moveTo(0.0, block.height);
|
||||
path.lineTo(block.maxContentWidth, block.height);
|
||||
paint.color = const ui.Color(0xFFFF9000);
|
||||
paint.setStyle(ui.PaintingStyle.stroke);
|
||||
paint.strokeWidth = 3.0;
|
||||
paint
|
||||
..color = const ui.Color(0xFFFF9000)
|
||||
..style = ui.PaintingStyle.stroke
|
||||
..strokeWidth = 3.0;
|
||||
canvas.drawPath(path, paint);
|
||||
|
||||
// paint the text
|
||||
@@ -49,9 +50,9 @@ ui.Picture paint(ui.Rect paintBounds) {
|
||||
ui.PictureRecorder recorder = new ui.PictureRecorder();
|
||||
ui.Canvas canvas = new ui.Canvas(recorder, paintBounds);
|
||||
|
||||
ui.Paint paint = new ui.Paint();
|
||||
paint.color = const ui.Color(0xFFFFFFFF);
|
||||
paint.setStyle(ui.PaintingStyle.fill);
|
||||
ui.Paint paint = new ui.Paint()
|
||||
..color = const ui.Color(0xFFFFFFFF)
|
||||
..style = ui.PaintingStyle.fill;
|
||||
canvas.drawRect(new ui.Rect.fromLTRB(0.0, 0.0, ui.view.width, ui.view.height), paint);
|
||||
|
||||
canvas.translate(10.0, 0.0);
|
||||
|
||||
@@ -29,7 +29,7 @@ ui.Picture paint(ui.Rect paintBounds) {
|
||||
[new ui.Point(-radius, -radius), new ui.Point(0.0, 0.0)],
|
||||
[const ui.Color(0xFFFFFF00), const ui.Color(0xFF0000FF)]);
|
||||
canvas.drawRect(new ui.Rect.fromLTRB(-radius, -radius, radius, radius),
|
||||
new ui.Paint()..setShader(yellowBlue));
|
||||
new ui.Paint()..shader = yellowBlue);
|
||||
|
||||
// Scale x and y by 0.5.
|
||||
var scaleMatrix = new Float64List.fromList([
|
||||
|
||||
@@ -48,10 +48,10 @@ RenderBox getBox(double lh) {
|
||||
path.lineTo(w, baseline);
|
||||
path.moveTo(0.0, h);
|
||||
path.lineTo(w, h);
|
||||
Paint paint = new Paint();
|
||||
paint.color = const Color(0xFFFF9000);
|
||||
paint.setStyle(ui.PaintingStyle.stroke);
|
||||
paint.strokeWidth = 3.0;
|
||||
Paint paint = new Paint()
|
||||
..color = const Color(0xFFFF9000)
|
||||
..style = ui.PaintingStyle.stroke
|
||||
..strokeWidth = 3.0;
|
||||
canvas.drawPath(path, paint);
|
||||
}
|
||||
)
|
||||
|
||||
@@ -49,11 +49,11 @@ class StockArrow extends StatelessComponent {
|
||||
path.lineTo(centerX + w, arrowY + h);
|
||||
path.lineTo(centerX - w, arrowY + h);
|
||||
path.close();
|
||||
paint.setStyle(ui.PaintingStyle.fill);
|
||||
paint.style = ui.PaintingStyle.fill;
|
||||
canvas.drawPath(path, paint);
|
||||
|
||||
// Draw a circle that circumscribes the arrow.
|
||||
paint.setStyle(ui.PaintingStyle.stroke);
|
||||
paint.style = ui.PaintingStyle.stroke;
|
||||
canvas.drawCircle(new Point(centerX, centerY), r, paint);
|
||||
});
|
||||
|
||||
|
||||
@@ -36,9 +36,10 @@ class Marker extends StatelessComponent {
|
||||
double r = size / 2.0;
|
||||
canvas.drawCircle(new Point(r, r), r, paint);
|
||||
|
||||
paint.color = const Color(0xFFFFFFFF);
|
||||
paint.setStyle(ui.PaintingStyle.stroke);
|
||||
paint.strokeWidth = 1.0;
|
||||
paint
|
||||
..color = const Color(0xFFFFFFFF)
|
||||
..style = ui.PaintingStyle.stroke
|
||||
..strokeWidth = 1.0;
|
||||
if (type == MarkerType.topLeft) {
|
||||
canvas.drawLine(new Point(r, r), new Point(r + r - 1.0, r), paint);
|
||||
canvas.drawLine(new Point(r, r), new Point(r, r + r - 1.0), paint);
|
||||
|
||||
Reference in New Issue
Block a user