| Flutter Impeller |

image_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_IMAGE_FILTER_H_
6 #define FLUTTER_IMPELLER_TOOLKIT_INTEROP_IMAGE_FILTER_H_
7
8 #include "flutter/display_list/effects/dl_image_filter.h"
9 #include "impeller/toolkit/interop/formats.h"
10 #include "impeller/toolkit/interop/impeller.h"
11 #include "impeller/toolkit/interop/object.h"
12
13 namespace impeller::interop {
14
15 class ImageFilter final
16 : public Object<ImageFilter,
17 IMPELLER_INTERNAL_HANDLE_NAME(ImpellerImageFilter)> {
18 public:
19 static ScopedObject<ImageFilter> MakeBlur(Scalar x_sigma,
20 Scalar y_sigma,
21 flutter::DlTileMode tile_mode);
22
23 static ScopedObject<ImageFilter> MakeDilate(Scalar x_radius, Scalar y_radius);
24
25 static ScopedObject<ImageFilter> MakeErode(Scalar x_radius, Scalar y_radius);
26
27 static ScopedObject<ImageFilter> MakeMatrix(
28 const Matrix& matrix,
29 flutter::DlImageSampling sampling);
30
31 static ScopedObject<ImageFilter> MakeCompose(const ImageFilter& outer,
32 const ImageFilter& inner);
33
34 explicit ImageFilter(std::shared_ptr<flutter::DlImageFilter> filter);
35
36 ~ImageFilter() override;
37
38 ImageFilter(const ImageFilter&) = delete;
39
40 ImageFilter& operator=(const ImageFilter&) = delete;
41
42 const std::shared_ptr<flutter::DlImageFilter>& GetImageFilter() const;
43
44 private:
45 std::shared_ptr<flutter::DlImageFilter> filter_;
46 };
47
48 } // namespace impeller::interop
49
50 #endif // FLUTTER_IMPELLER_TOOLKIT_INTEROP_IMAGE_FILTER_H_
impeller::interop::ImageFilter
Definition: image_filter.h:17
impeller::interop::ImageFilter::MakeDilate
static ScopedObject< ImageFilter > MakeDilate(Scalar x_radius, Scalar y_radius)
Definition: image_filter.cc:26
impeller::interop::ImageFilter::~ImageFilter
~ImageFilter() override
impeller::interop::ImageFilter::ImageFilter
ImageFilter(std::shared_ptr< flutter::DlImageFilter > filter)
Definition: image_filter.cc:11
impeller::interop::ImageFilter::operator=
ImageFilter & operator=(const ImageFilter &)=delete
impeller::interop::ImageFilter::MakeErode
static ScopedObject< ImageFilter > MakeErode(Scalar x_radius, Scalar y_radius)
Definition: image_filter.cc:35
impeller::interop::ImageFilter::GetImageFilter
const std::shared_ptr< flutter::DlImageFilter > & GetImageFilter() const
Definition: image_filter.cc:64
impeller::interop::ImageFilter::MakeCompose
static ScopedObject< ImageFilter > MakeCompose(const ImageFilter &outer, const ImageFilter &inner)
Definition: image_filter.cc:54
impeller::interop::ImageFilter::ImageFilter
ImageFilter(const ImageFilter &)=delete
impeller::interop::ImageFilter::MakeBlur
static ScopedObject< ImageFilter > MakeBlur(Scalar x_sigma, Scalar y_sigma, flutter::DlTileMode tile_mode)
Definition: image_filter.cc:16
impeller::interop::ImageFilter::MakeMatrix
static ScopedObject< ImageFilter > MakeMatrix(const Matrix &matrix, flutter::DlImageSampling sampling)
Definition: image_filter.cc:44
impeller::interop::Object
Definition: object.h:56
impeller::interop::ScopedObject
Definition: object.h:67
impeller.h
impeller::interop
Definition: color_filter.cc:7
impeller::Scalar
float Scalar
Definition: scalar.h:18
object.h
impeller::Matrix
A 4x4 matrix using column-major storage.
Definition: matrix.h:37
formats.h