Flutter Impeller
paint.h
Go to the documentation of this file.
1 // Copyright 2013 The Flutter Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef FLUTTER_IMPELLER_TOOLKIT_INTEROP_PAINT_H_
6 #define FLUTTER_IMPELLER_TOOLKIT_INTEROP_PAINT_H_
7 
8 #include "flutter/display_list/dl_color.h"
9 #include "flutter/display_list/dl_paint.h"
18 
19 namespace impeller::interop {
20 
21 class Paint final
22  : public Object<Paint, IMPELLER_INTERNAL_HANDLE_NAME(ImpellerPaint)> {
23  public:
24  Paint();
25 
26  ~Paint() override;
27 
28  Paint(const Paint&) = delete;
29 
30  Paint& operator=(const Paint&) = delete;
31 
32  const flutter::DlPaint& GetPaint() const;
33 
34  void SetColor(flutter::DlColor color);
35 
36  void SetBlendMode(BlendMode mode);
37 
38  void SetDrawStyle(flutter::DlDrawStyle style);
39 
40  void SetStrokeCap(flutter::DlStrokeCap stroke_cap);
41 
42  void SetStrokeJoin(flutter::DlStrokeJoin stroke_join);
43 
44  void SetStrokeWidth(Scalar width);
45 
46  void SetStrokeMiter(Scalar miter);
47 
48  void SetColorFilter(const ColorFilter& filter);
49 
50  void SetColorSource(const ColorSource& source);
51 
52  void SetImageFilter(const ImageFilter& filter);
53 
54  void SetMaskFilter(const MaskFilter& filter);
55 
56  private:
57  flutter::DlPaint paint_;
58 };
59 
60 } // namespace impeller::interop
61 
62 #endif // FLUTTER_IMPELLER_TOOLKIT_INTEROP_PAINT_H_
void SetDrawStyle(flutter::DlDrawStyle style)
Definition: paint.cc:25
void SetColorSource(const ColorSource &source)
Definition: paint.cc:49
void SetStrokeWidth(Scalar width)
Definition: paint.cc:37
void SetStrokeJoin(flutter::DlStrokeJoin stroke_join)
Definition: paint.cc:33
void SetImageFilter(const ImageFilter &filter)
Definition: paint.cc:53
void SetStrokeMiter(Scalar miter)
Definition: paint.cc:41
Paint & operator=(const Paint &)=delete
void SetStrokeCap(flutter::DlStrokeCap stroke_cap)
Definition: paint.cc:29
Paint(const Paint &)=delete
void SetBlendMode(BlendMode mode)
Definition: paint.cc:21
void SetMaskFilter(const MaskFilter &filter)
Definition: paint.cc:57
void SetColor(flutter::DlColor color)
Definition: paint.cc:17
void SetColorFilter(const ColorFilter &filter)
Definition: paint.cc:45
const flutter::DlPaint & GetPaint() const
Definition: paint.cc:13
float Scalar
Definition: scalar.h:19
BlendMode
Definition: color.h:58