Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
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_LIB_UI_PAINTING_COLOR_FILTER_H_
6#define FLUTTER_LIB_UI_PAINTING_COLOR_FILTER_H_
7
8#include "flutter/display_list/effects/dl_color_filter.h"
9#include "flutter/lib/ui/dart_wrapper.h"
11
12namespace flutter {
13
14// A handle to an SkCodec object.
15//
16// Doesn't mirror SkCodec's API but provides a simple sequential access API.
17class ColorFilter : public RefCountedDartWrappable<ColorFilter> {
18 DEFINE_WRAPPERTYPEINFO();
20
21 public:
22 static void Create(Dart_Handle wrapper);
23
24 void initMode(int color, int blend_mode);
25 void initMatrix(const tonic::Float32List& color_matrix);
28
29 ~ColorFilter() override;
30
31 const std::shared_ptr<const DlColorFilter> filter() const { return filter_; }
32
33 private:
34 std::shared_ptr<const DlColorFilter> filter_;
35};
36
37} // namespace flutter
38
39#endif // FLUTTER_LIB_UI_PAINTING_COLOR_FILTER_H_
SkColor4f color
static sk_sp< Effect > Create()
const std::shared_ptr< const DlColorFilter > filter() const
void initMatrix(const tonic::Float32List &color_matrix)
void initMode(int color, int blend_mode)
~ColorFilter() override
struct _Dart_Handle * Dart_Handle
Definition dart_api.h:258
#define FML_FRIEND_MAKE_REF_COUNTED(T)