| Flutter Impeller |

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

`#include <image_filter.h>`

Inheritance diagram for impeller::ImageFilter:

## Public Member Functions
| ImageFilter ()
virtual | ~ImageFilter ()
std::shared_ptr< FilterContents > | GetFilterContents () const
| Generate a new FilterContents using this filter's configuration. More...
virtual std::shared_ptr< FilterContents > | WrapInput (const FilterInput::Ref &input) const =0
| Wraps the given filter input with a GPU-based image filter. More...
virtual std::shared_ptr< ImageFilter > | Clone () const =0

## Static Public Member Functions
static std::shared_ptr< ImageFilter > | MakeBlur (Sigma sigma_x, Sigma sigma_y, FilterContents::BlurStyle blur_style, Entity::TileMode tile_mode)
static std::shared_ptr< ImageFilter > | MakeDilate (Radius radius_x, Radius radius_y)
static std::shared_ptr< ImageFilter > | MakeErode (Radius radius_x, Radius radius_y)
static std::shared_ptr< ImageFilter > | MakeMatrix (const Matrix &matrix, SamplerDescriptor sampler_descriptor)
static std::shared_ptr< ImageFilter > | MakeCompose (const ImageFilter &inner, const ImageFilter &outer)
static std::shared_ptr< ImageFilter > | MakeFromColorFilter (const ColorFilter &color_filter)
static std::shared_ptr< ImageFilter > | MakeLocalMatrix (const Matrix &matrix, const ImageFilter &internal_filter)

## Detailed Description

Definition at line 22 of file image_filter.h.

## Constructor & Destructor Documentation

## ◆ ImageFilter()

impeller::ImageFilter::ImageFilter | ( |  | ) |
| default

## ◆ ~ImageFilter()

impeller::ImageFilter::~ImageFilter | ( |  | ) |
| virtual default

## Member Function Documentation

## ◆ Clone()

virtual std::shared_ptr<ImageFilter> impeller::ImageFilter::Clone | ( |  | ) | const
| pure virtual

Implemented in impeller::LocalMatrixImageFilter, impeller::ColorImageFilter, impeller::ComposeImageFilter, impeller::MatrixImageFilter, impeller::ErodeImageFilter, impeller::DilateImageFilter, and impeller::BlurImageFilter.

## ◆ GetFilterContents()

std::shared_ptr< FilterContents > impeller::ImageFilter::GetFilterContents | ( |  | ) | const

Generate a new FilterContents using this filter's configuration.

        This is the same as WrapInput, except no input is set. The input
        for the filter chain can be set later using.
        FilterContents::SetLeafInputs().

See also
  `FilterContents::SetLeafInputs`

Definition at line 63 of file image_filter.cc.

63 {
64 return WrapInput(FilterInput::Make(Rect()));
65 }

References impeller::FilterInput::Make(), and WrapInput().

## ◆ MakeBlur()

std::shared_ptr< ImageFilter > impeller::ImageFilter::MakeBlur | ( | Sigma | sigma_x,
|  | Sigma | sigma_y,
|  | FilterContents::BlurStyle | blur_style,
|  | Entity::TileMode | tile_mode
| ) |  |
| static

Definition at line 20 of file image_filter.cc.

24 {
25 return std::make_shared<BlurImageFilter>(sigma_x, sigma_y, blur_style,
26 tile_mode);
27 }

Referenced by impeller::ToImageFilter().

## ◆ MakeCompose()

std::shared_ptr< ImageFilter > impeller::ImageFilter::MakeCompose | ( | const ImageFilter & | inner,
|  | const ImageFilter & | outer
| ) |  |
| static

Definition at line 46 of file image_filter.cc.

48 {
49 return std::make_shared<ComposeImageFilter>(inner, outer);
50 }

Referenced by impeller::ToImageFilter().

## ◆ MakeDilate()

std::shared_ptr< ImageFilter > impeller::ImageFilter::MakeDilate | ( | Radius | radius_x,
|  | Radius | radius_y
| ) |  |
| static

Definition at line 29 of file image_filter.cc.

30 {
31 return std::make_shared<DilateImageFilter>(radius_x, radius_y);
32 }

Referenced by impeller::ToImageFilter().

## ◆ MakeErode()

std::shared_ptr< ImageFilter > impeller::ImageFilter::MakeErode | ( | Radius | radius_x,
|  | Radius | radius_y
| ) |  |
| static

Definition at line 34 of file image_filter.cc.

35 {
36 return std::make_shared<ErodeImageFilter>(radius_x, radius_y);
37 }

Referenced by impeller::ToImageFilter().

## ◆ MakeFromColorFilter()

std::shared_ptr< ImageFilter > impeller::ImageFilter::MakeFromColorFilter | ( | const ColorFilter & | color_filter | ) |
| static

Definition at line 52 of file image_filter.cc.

53 {
54 return std::make_shared<ColorImageFilter>(color_filter);
55 }

Referenced by impeller::ToImageFilter().

## ◆ MakeLocalMatrix()

std::shared_ptr< ImageFilter > impeller::ImageFilter::MakeLocalMatrix | ( | const Matrix & | matrix,
|  | const ImageFilter & | internal_filter
| ) |  |
| static

Definition at line 57 of file image_filter.cc.

59 {
60 return std::make_shared<LocalMatrixImageFilter>(matrix, internal_filter);
61 }

Referenced by impeller::ToImageFilter().

## ◆ MakeMatrix()

std::shared_ptr< ImageFilter > impeller::ImageFilter::MakeMatrix | ( | const Matrix & | matrix,
|  | SamplerDescriptor | sampler_descriptor
| ) |  |
| static

Definition at line 39 of file image_filter.cc.

41 {
42 return std::make_shared<MatrixImageFilter>(matrix,
43 std::move(sampler_descriptor));
44 }

Referenced by impeller::ToImageFilter().

## ◆ WrapInput()

virtual std::shared_ptr<FilterContents> impeller::ImageFilter::WrapInput | ( | const FilterInput::Ref & | input | ) | const
| pure virtual

Wraps the given filter input with a GPU-based image filter.

Implemented in impeller::LocalMatrixImageFilter, impeller::ColorImageFilter, impeller::ComposeImageFilter, impeller::MatrixImageFilter, impeller::ErodeImageFilter, impeller::DilateImageFilter, and impeller::BlurImageFilter.

Referenced by GetFilterContents().

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

- impeller/aiks/image_filter.h
- impeller/aiks/image_filter.cc

impeller::ImageFilter::WrapInput
virtual std::shared_ptr< FilterContents > WrapInput(const FilterInput::Ref &input) const =0
Wraps the given filter input with a GPU-based image filter.
impeller::FilterInput::Make
static FilterInput::Ref Make(Variant input, bool msaa_enabled=true)
Definition: filter_input.cc:19
impeller::Rect
TRect< Scalar > Rect
Definition: rect.h:306