OLD | NEW |
---|---|
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef SKY_ENGINE_CORE_PAINTING_CANVASGRADIENT_H_ | 5 #ifndef SKY_ENGINE_CORE_PAINTING_CANVASGRADIENT_H_ |
6 #define SKY_ENGINE_CORE_PAINTING_CANVASGRADIENT_H_ | 6 #define SKY_ENGINE_CORE_PAINTING_CANVASGRADIENT_H_ |
7 | 7 |
8 #include "sky/engine/core/painting/CanvasColor.h" | 8 #include "sky/engine/core/painting/CanvasColor.h" |
9 #include "sky/engine/core/painting/Point.h" | 9 #include "sky/engine/core/painting/Point.h" |
10 #include "sky/engine/core/painting/Shader.h" | 10 #include "sky/engine/core/painting/Shader.h" |
11 #include "sky/engine/tonic/dart_wrappable.h" | 11 #include "sky/engine/tonic/dart_wrappable.h" |
12 #include "third_party/skia/include/effects/SkGradientShader.h" | 12 #include "third_party/skia/include/effects/SkGradientShader.h" |
13 | 13 |
14 namespace blink { | 14 namespace blink { |
15 | 15 |
16 class CanvasGradient : public Shader { | 16 class CanvasGradient : public Shader { |
17 DEFINE_WRAPPERTYPEINFO(); | 17 DEFINE_WRAPPERTYPEINFO(); |
18 public: | 18 public: |
19 ~CanvasGradient() override; | 19 ~CanvasGradient() override; |
20 static PassRefPtr<CanvasGradient> create(); | 20 static PassRefPtr<CanvasGradient> create(); |
21 | 21 |
22 void initLinear(const Vector<Point>& end_points, | 22 void initLinear(const Vector<Point>& end_points, |
23 const Vector<SkColor>& colors, | 23 const Vector<SkColor>& colors, |
24 const Vector<float>& color_stops); | 24 const Vector<float>& color_stops, |
25 unsigned tile_mode); | |
eseidel
2015/06/09 17:45:22
Why can't the C++ use an enum?
Matt Perry
2015/06/09 19:01:25
It can, but then I'd have to write code to do the
| |
25 void initRadial(const Point& center, | 26 void initRadial(const Point& center, |
26 double radius, | 27 double radius, |
27 const Vector<SkColor>& colors, | 28 const Vector<SkColor>& colors, |
28 const Vector<float>& color_stops); | 29 const Vector<float>& color_stops, |
30 unsigned tile_mode); | |
29 | 31 |
30 private: | 32 private: |
31 CanvasGradient(); | 33 CanvasGradient(); |
32 }; | 34 }; |
33 | 35 |
34 } // namespace blink | 36 } // namespace blink |
35 | 37 |
36 #endif // SKY_ENGINE_CORE_PAINTING_CANVASGRADIENT_H_ | 38 #endif // SKY_ENGINE_CORE_PAINTING_CANVASGRADIENT_H_ |
OLD | NEW |