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

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

Issue 1172173002: Clean up a bunch of our Dart code. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: upstream merge Created 5 years, 6 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 | « no previous file | sky/engine/core/painting/Point.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/painting/Color.dart
diff --git a/sky/engine/core/painting/Color.dart b/sky/engine/core/painting/Color.dart
index be59871bb10ddd626dfe78d8cc75368fac25c20f..65ed9be1db6cabc6fce24b5d471c2dc9def783db 100644
--- a/sky/engine/core/painting/Color.dart
+++ b/sky/engine/core/painting/Color.dart
@@ -5,9 +5,6 @@
part of dart.sky;
class Color {
- final int _value;
- int get value => _value;
-
const Color(this._value);
const Color.fromARGB(int a, int r, int g, int b) :
_value = (((a & 0xff) << 24) |
@@ -15,6 +12,9 @@ class Color {
((g & 0xff) << 8) |
((b & 0xff) << 0));
+ final int _value;
+ int get value => _value;
+
int get alpha => (0xff000000 & _value) >> 24;
int get red => (0x00ff0000 & _value) >> 16;
int get green => (0x0000ff00 & _value) >> 8;
« no previous file with comments | « no previous file | sky/engine/core/painting/Point.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698