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

Unified Diff: third_party/WebKit/Source/platform/graphics/Gradient.h

Issue 2787113002: Initial conic-gradient() implementation (Closed)
Patch Set: silence msvc warning Created 3 years, 9 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: third_party/WebKit/Source/platform/graphics/Gradient.h
diff --git a/third_party/WebKit/Source/platform/graphics/Gradient.h b/third_party/WebKit/Source/platform/graphics/Gradient.h
index cd8d5cba9f33ab8c12fb3e420aeb65fcf7553780..008bbf94683025a89f2cfd4670882a922be3d283 100644
--- a/third_party/WebKit/Source/platform/graphics/Gradient.h
+++ b/third_party/WebKit/Source/platform/graphics/Gradient.h
@@ -51,7 +51,7 @@ class PLATFORM_EXPORT Gradient : public RefCounted<Gradient> {
WTF_MAKE_NONCOPYABLE(Gradient);
public:
- enum class Type { Linear, Radial };
+ enum class Type { Linear, Radial, Conic };
enum class ColorInterpolation {
Premultiplied,
@@ -73,6 +73,12 @@ class PLATFORM_EXPORT Gradient : public RefCounted<Gradient> {
GradientSpreadMethod = SpreadMethodPad,
ColorInterpolation = ColorInterpolation::Unpremultiplied);
+ static PassRefPtr<Gradient> createConic(
+ const FloatPoint& position,
+ float angle,
+ GradientSpreadMethod = SpreadMethodPad,
+ ColorInterpolation = ColorInterpolation::Unpremultiplied);
+
virtual ~Gradient() = default;
Type getType() const { return m_type; }

Powered by Google App Engine
This is Rietveld 408576698