Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(955)

Unified Diff: sky/engine/core/painting/Canvas.dart

Issue 1151673002: Sky: different tack for custom Rect type in the Canvas API. (Closed) Base URL: git@github.com:/domokit/mojo.git@master
Patch Set: Float32List Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/engine/core/painting/Canvas.cpp ('k') | sky/engine/core/painting/Canvas.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/painting/Canvas.dart
diff --git a/sky/engine/core/painting/Canvas.dart b/sky/engine/core/painting/Canvas.dart
deleted file mode 100644
index 0d75a63bd8e577ba6825a65e8c0d6aad5e31cd15..0000000000000000000000000000000000000000
--- a/sky/engine/core/painting/Canvas.dart
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// This extends the Canvas.dart generated from Canvas.idl.
-
-class Rect {
- List<double> _value;
- double get left => _value[0];
- double get top => _value[1];
- double get right => _value[2];
- double get bottom => _value[3];
-
- void setLTRB(double left, double top, double right, double bottom) {
- _value = [left, top, right, bottom];
- }
-}
-
-class Canvas extends _Canvas {
- double get height => _height;
- double get width => _width;
-
- void save() => _save();
- void saveLayer(Rect bounds, Paint paint) =>
- _saveLayer(bounds._value, Paint paint);
- void restore() => _restore();
- void translate(double dx, double dy) => _translate(dx, dy);
- void scale(double sx, double sy) => _scale(sx, sy);
- void rotateDegrees(double degrees) => _rotateDegrees(degrees);
- void skew(double sx, double sy) => _skew(sx, sy);
- void concat(List<double> matrix9) => _concat(matrix9);
- void clipRect(Rect rect) => _clipRect(rect._value);
-
- void drawPicture(Picture picture) => _drawPicture(picture);
- void drawPaint(Paint paint) => _drawPaint(paint);
- void drawRect(Rect rect, Paint paint) => _drawRect(rect._value, paint);
- void drawOval(Rect rect, Paint paint) => _drawOval(rect._value, paint);
- void drawCircle(double x, double y, double radius, Paint paint) =>
- _drawCircle(x, y, radius, paint);
-}
« no previous file with comments | « sky/engine/core/painting/Canvas.cpp ('k') | sky/engine/core/painting/Canvas.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698