Flutter Impeller
color_filter.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_COLOR_FILTER_H_
6 #define FLUTTER_IMPELLER_TOOLKIT_INTEROP_COLOR_FILTER_H_
7 
8 #include "flutter/display_list/effects/dl_color_filter.h"
12 
13 namespace impeller::interop {
14 
15 class ColorFilter final
16  : public Object<ColorFilter,
17  IMPELLER_INTERNAL_HANDLE_NAME(ImpellerColorFilter)> {
18  public:
20 
21  static ScopedObject<ColorFilter> MakeMatrix(const float matrix[20]);
22 
23  explicit ColorFilter(std::shared_ptr<const flutter::DlColorFilter> filter);
24 
25  ~ColorFilter() override;
26 
27  ColorFilter(const ColorFilter&) = delete;
28 
29  ColorFilter& operator=(const ColorFilter&) = delete;
30 
31  const std::shared_ptr<const flutter::DlColorFilter>& GetColorFilter() const;
32 
33  private:
34  std::shared_ptr<const flutter::DlColorFilter> filter_;
35 };
36 
37 } // namespace impeller::interop
38 
39 #endif // FLUTTER_IMPELLER_TOOLKIT_INTEROP_COLOR_FILTER_H_
const std::shared_ptr< const flutter::DlColorFilter > & GetColorFilter() const
Definition: color_filter.cc:32
ColorFilter & operator=(const ColorFilter &)=delete
ColorFilter(std::shared_ptr< const flutter::DlColorFilter > filter)
Definition: color_filter.cc:26
static ScopedObject< ColorFilter > MakeMatrix(const float matrix[20])
Definition: color_filter.cc:18
ColorFilter(const ColorFilter &)=delete
static ScopedObject< ColorFilter > MakeBlend(Color color, BlendMode mode)
Definition: color_filter.cc:9
BlendMode
Definition: color.h:58