| 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"
10 #include "impeller/geometry/color.h"
11 #include "impeller/toolkit/interop/color_filter.h"
12 #include "impeller/toolkit/interop/color_source.h"
13 #include "impeller/toolkit/interop/formats.h"
14 #include "impeller/toolkit/interop/image_filter.h"
15 #include "impeller/toolkit/interop/impeller.h"
16 #include "impeller/toolkit/interop/mask_filter.h"
17 #include "impeller/toolkit/interop/object.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_
impeller::interop::Paint::SetDrawStyle
void SetDrawStyle(flutter::DlDrawStyle style)
Definition: paint.cc:25
impeller.h
impeller::interop::Paint::SetMaskFilter
void SetMaskFilter(const MaskFilter &filter)
Definition: paint.cc:57
impeller::interop::Paint::Paint
Paint()
impeller::interop::Object
Definition: object.h:56
impeller::Scalar
float Scalar
Definition: scalar.h:18
image_filter.h
impeller::interop::Paint::SetBlendMode
void SetBlendMode(BlendMode mode)
Definition: paint.cc:21
impeller::interop::ColorSource
Definition: color_source.h:21
color_filter.h
impeller::BlendMode
BlendMode
Definition: color.h:58
impeller::interop::MaskFilter
Definition: mask_filter.h:14
impeller::interop::Paint::SetColorSource
void SetColorSource(const ColorSource &source)
Definition: paint.cc:49
impeller::interop
Definition: color_filter.cc:7
impeller::interop::Paint::SetStrokeMiter
void SetStrokeMiter(Scalar miter)
Definition: paint.cc:41
impeller::interop::Paint::~Paint
~Paint() override
impeller::interop::Paint::SetStrokeWidth
void SetStrokeWidth(Scalar width)
Definition: paint.cc:37
impeller::interop::ColorFilter
Definition: color_filter.h:15
color_source.h
impeller::interop::Paint::SetColorFilter
void SetColorFilter(const ColorFilter &filter)
Definition: paint.cc:45
formats.h
impeller::interop::ImageFilter
Definition: image_filter.h:15
impeller::interop::Paint::operator=
Paint & operator=(const Paint &)=delete
impeller::interop::Paint::SetStrokeCap
void SetStrokeCap(flutter::DlStrokeCap stroke_cap)
Definition: paint.cc:29
impeller::interop::Paint
Definition: paint.h:21
impeller::interop::Paint::GetPaint
const flutter::DlPaint & GetPaint() const
Definition: paint.cc:13
impeller::interop::Paint::SetColor
void SetColor(flutter::DlColor color)
Definition: paint.cc:17
color.h
impeller::interop::Paint::SetStrokeJoin
void SetStrokeJoin(flutter::DlStrokeJoin stroke_join)
Definition: paint.cc:33
object.h
mask_filter.h
impeller::interop::Paint::SetImageFilter
void SetImageFilter(const ImageFilter &filter)
Definition: paint.cc:53