| Flutter Impeller |

Public Member Functions | Static Public Member Functions | List of all members
impeller::interop::ImageFilter Class Referencefinal

`#include <image_filter.h>`

Inheritance diagram for impeller::interop::ImageFilter:

## Public Member Functions
| ImageFilter (std::shared_ptr< const flutter::DlImageFilter > filter)
| ~ImageFilter () override
| ImageFilter (const ImageFilter &)=delete
ImageFilter & | operator= (const ImageFilter &)=delete
const std::shared_ptr< const flutter::DlImageFilter > & | GetImageFilter () const
Public Member Functions inherited from impeller::interop::ObjectBase
| ObjectBase ()=default
virtual | ~ObjectBase ()=default
| ObjectBase (const ObjectBase &)=delete
| ObjectBase (ObjectBase &&)=delete
ObjectBase & | operator= (const ObjectBase &)=delete
ObjectBase & | operator= (ObjectBase &&)=delete
void | Retain ()
void | Release ()
uint64_t | GetRefCountForTests () const

## Static Public Member Functions
static ScopedObject< ImageFilter > | MakeBlur (Scalar x_sigma, Scalar y_sigma, flutter::DlTileMode tile_mode)
static ScopedObject< ImageFilter > | MakeDilate (Scalar x_radius, Scalar y_radius)
static ScopedObject< ImageFilter > | MakeErode (Scalar x_radius, Scalar y_radius)
static ScopedObject< ImageFilter > | MakeMatrix (const Matrix &matrix, flutter::DlImageSampling sampling)
static ScopedObject< ImageFilter > | MakeCompose (const ImageFilter &outer, const ImageFilter &inner)
Static Public Member Functions inherited from impeller::interop::ObjectBase
static void | SafeRetain (void *ptr)
static void | SafeRelease (void *ptr)

## Additional Inherited Members
Public Types inherited from impeller::interop::Object< ImageFilter, IMPELLER_INTERNAL_HANDLE_NAME(ImpellerImageFilter)>
using | InteropClass = ImageFilter
using | InteropCSibling = IMPELLER_INTERNAL_HANDLE_NAME(ImpellerImageFilter)

## Detailed Description

Definition at line 15 of file image_filter.h.

## Constructor & Destructor Documentation

## ◆ ImageFilter() [1/2]

impeller::interop::ImageFilter::ImageFilter | ( | std::shared_ptr< const flutter::DlImageFilter > | filter | ) |
| explicit

Definition at line 9 of file image_filter.cc.

10 : filter_(std::move(filter)) {}

## ◆ ~ImageFilter()

impeller::interop::ImageFilter::~ImageFilter | ( |  | ) |
| override default

## ◆ ImageFilter() [2/2]

impeller::interop::ImageFilter::ImageFilter | ( | const ImageFilter & |  | ) |
| delete

## Member Function Documentation

## ◆ GetImageFilter()

const std::shared_ptr< const flutter::DlImageFilter > & impeller::interop::ImageFilter::GetImageFilter | ( |  | ) | const

Definition at line 64 of file image_filter.cc.

64 {
65 return filter_;
66 }

Referenced by MakeCompose(), impeller::interop::DisplayListBuilder::SaveLayer(), and impeller::interop::Paint::SetImageFilter().

## ◆ MakeBlur()

ScopedObject< ImageFilter > impeller::interop::ImageFilter::MakeBlur | ( | Scalar | x_sigma,
|  | Scalar | y_sigma,
|  | flutter::DlTileMode | tile_mode
| ) |  |
| static

Definition at line 14 of file image_filter.cc.

16 {
17 auto filter = flutter::DlBlurImageFilter::Make(x_sigma, y_sigma, tile_mode);
18 if (!filter) {
19 return nullptr;
20 }
21 return Create<ImageFilter>(std::move(filter));
22 }

Referenced by ImpellerImageFilterCreateBlurNew().

## ◆ MakeCompose()

ScopedObject< ImageFilter > impeller::interop::ImageFilter::MakeCompose | ( | const ImageFilter & | outer,
|  | const ImageFilter & | inner
| ) |  |
| static

Definition at line 53 of file image_filter.cc.

54 {
55 auto filter = flutter::DlComposeImageFilter::Make(outer.GetImageFilter(),
56 inner.GetImageFilter());
57 if (!filter) {
58 return nullptr;
59 }
60 return Create<ImageFilter>(std::move(filter));
61 }

References GetImageFilter().

Referenced by impeller::interop::ImpellerImageFilterCreateComposeNew().

## ◆ MakeDilate()

ScopedObject< ImageFilter > impeller::interop::ImageFilter::MakeDilate | ( | Scalar | x_radius,
|  | Scalar | y_radius
| ) |  |
| static

Definition at line 24 of file image_filter.cc.

25 {
26 auto filter = flutter::DlDilateImageFilter::Make(x_radius, y_radius);
27 if (!filter) {
28 return nullptr;
29 }
30 return Create<ImageFilter>(std::move(filter));
31 }

Referenced by ImpellerImageFilterCreateDilateNew().

## ◆ MakeErode()

ScopedObject< ImageFilter > impeller::interop::ImageFilter::MakeErode | ( | Scalar | x_radius,
|  | Scalar | y_radius
| ) |  |
| static

Definition at line 33 of file image_filter.cc.

34 {
35 auto filter = flutter::DlErodeImageFilter::Make(x_radius, y_radius);
36 if (!filter) {
37 return nullptr;
38 }
39 return Create<ImageFilter>(std::move(filter));
40 }

Referenced by ImpellerImageFilterCreateErodeNew().

## ◆ MakeMatrix()

ScopedObject< ImageFilter > impeller::interop::ImageFilter::MakeMatrix | ( | const Matrix & | matrix,
|  | flutter::DlImageSampling | sampling
| ) |  |
| static

Definition at line 42 of file image_filter.cc.

44 {
45 auto filter =
46 flutter::DlMatrixImageFilter::Make(ToSkMatrix(matrix), sampling);
47 if (!filter) {
48 return nullptr;
49 }
50 return Create<ImageFilter>(std::move(filter));
51 }

References impeller::interop::ToSkMatrix().

Referenced by impeller::interop::ImpellerImageFilterCreateMatrixNew().

## ◆ operator=()

ImageFilter& impeller::interop::ImageFilter::operator= | ( | const ImageFilter & |  | ) |
| delete

The documentation for this class was generated from the following files:

- impeller/toolkit/interop/image_filter.h
- impeller/toolkit/interop/image_filter.cc

impeller::interop::ToSkMatrix
constexpr SkMatrix ToSkMatrix(const Matrix &matrix)
Definition: formats.h:81