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

Unified Diff: sky/engine/core/painting/Paint.h

Issue 1161273004: Add a Color class to dart:sky. (Closed) Base URL: git@github.com:/domokit/mojo.git@master
Patch Set: 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
Index: sky/engine/core/painting/Paint.h
diff --git a/sky/engine/core/painting/Paint.h b/sky/engine/core/painting/Paint.h
index ed94297790d476748123eff48c3f24dd331d9f42..9826515a8cc9dc2ab345329e3a314351f5355be0 100644
--- a/sky/engine/core/painting/Paint.h
+++ b/sky/engine/core/painting/Paint.h
@@ -5,6 +5,7 @@
#ifndef SKY_ENGINE_CORE_PAINTING_PAINT_H_
#define SKY_ENGINE_CORE_PAINTING_PAINT_H_
+#include "sky/engine/core/painting/CanvasColor.h"
#include "sky/engine/tonic/dart_wrappable.h"
#include "sky/engine/wtf/PassRefPtr.h"
#include "sky/engine/wtf/RefCounted.h"
@@ -29,6 +30,7 @@ public:
unsigned color() const { return m_paint.getColor(); }
void setColor(unsigned color) { m_paint.setColor(color); }
+ void setColor(CanvasColor color) { m_paint.setColor(color.sk_color); }
void setARGB(unsigned a, unsigned r, unsigned g, unsigned b)
{

Powered by Google App Engine
This is Rietveld 408576698