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

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

Issue 1185423003: Add a Paint::toString() method to describe our Paint objects. (Closed) Base URL: git@github.com:/domokit/mojo.git@master
Patch Set: abarth 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/Paint.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/painting/Paint.h
diff --git a/sky/engine/core/painting/Paint.h b/sky/engine/core/painting/Paint.h
index 6d3451ae3fb2815e10ee4de5fb83ba63e59dfdd1..7888905d4250dd01d6d26e05822249056eca236d 100644
--- a/sky/engine/core/painting/Paint.h
+++ b/sky/engine/core/painting/Paint.h
@@ -11,6 +11,7 @@
#include "sky/engine/tonic/dart_wrappable.h"
#include "sky/engine/wtf/PassRefPtr.h"
#include "sky/engine/wtf/RefCounted.h"
+#include "sky/engine/wtf/text/WTFString.h"
#include "third_party/skia/include/core/SkPaint.h"
namespace blink {
@@ -21,39 +22,40 @@ class MaskFilter;
class Shader;
class Paint : public RefCounted<Paint>, public DartWrappable {
- DEFINE_WRAPPERTYPEINFO();
-public:
- ~Paint() override;
- static PassRefPtr<Paint> create()
- {
- return adoptRef(new Paint);
- }
+ DEFINE_WRAPPERTYPEINFO();
+ public:
+ ~Paint() override;
+ static PassRefPtr<Paint> create() { return adoptRef(new Paint); }
- bool isAntiAlias() const { return m_paint.isAntiAlias(); }
- void setIsAntiAlias(bool value) { m_paint.setAntiAlias(value); }
+ bool isAntiAlias() const { return paint_.isAntiAlias(); }
+ void setIsAntiAlias(bool value) { paint_.setAntiAlias(value); }
- SkColor color() const { return m_paint.getColor(); }
- void setColor(SkColor color) { m_paint.setColor(color); }
+ SkColor color() const { return paint_.getColor(); }
+ void setColor(SkColor color) { paint_.setColor(color); }
- SkScalar strokeWidth() const { return m_paint.getStrokeWidth(); }
- void setStrokeWidth(SkScalar strokeWidth) { m_paint.setStrokeWidth(strokeWidth); }
+ SkScalar strokeWidth() const { return paint_.getStrokeWidth(); }
+ void setStrokeWidth(SkScalar strokeWidth) {
+ paint_.setStrokeWidth(strokeWidth);
+ }
- void setDrawLooper(DrawLooper* looper);
- void setColorFilter(ColorFilter* filter);
- void setMaskFilter(MaskFilter* filter);
- void setShader(Shader* shader);
- void setStyle(SkPaint::Style style);
- void setTransferMode(SkXfermode::Mode transfer_mode);
+ void setDrawLooper(DrawLooper* looper);
+ void setColorFilter(ColorFilter* filter);
+ void setMaskFilter(MaskFilter* filter);
+ void setShader(Shader* shader);
+ void setStyle(SkPaint::Style style);
+ void setTransferMode(SkXfermode::Mode transfer_mode);
- const SkPaint& paint() const { return m_paint; }
- void setPaint(const SkPaint& paint) { m_paint = paint; }
+ const SkPaint& paint() const { return paint_; }
+ void setPaint(const SkPaint& paint) { paint_ = paint; }
-private:
- Paint();
+ String toString() const;
- SkPaint m_paint;
+ private:
+ Paint();
+
+ SkPaint paint_;
};
-} // namespace blink
+} // namespace blink
#endif // SKY_ENGINE_CORE_PAINTING_PAINT_H_
« no previous file with comments | « no previous file | sky/engine/core/painting/Paint.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698