| Flutter Impeller |

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

`#include <color_filter.h>`

Inheritance diagram for impeller::interop::ColorFilter:

## Public Member Functions
| ColorFilter (std::shared_ptr< const flutter::DlColorFilter > filter)
| ~ColorFilter () override
| ColorFilter (const ColorFilter &)=delete
ColorFilter & | operator= (const ColorFilter &)=delete
const std::shared_ptr< const flutter::DlColorFilter > & | GetColorFilter () 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< ColorFilter > | MakeBlend (Color color, BlendMode mode)
static ScopedObject< ColorFilter > | MakeMatrix (const float matrix[20])
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< ColorFilter, IMPELLER_INTERNAL_HANDLE_NAME(ImpellerColorFilter)>
using | InteropClass = ColorFilter
using | InteropCSibling = IMPELLER_INTERNAL_HANDLE_NAME(ImpellerColorFilter)

## Detailed Description

Definition at line 15 of file color_filter.h.

## Constructor & Destructor Documentation

## ◆ ColorFilter() [1/2]

impeller::interop::ColorFilter::ColorFilter | ( | std::shared_ptr< const flutter::DlColorFilter > | filter | ) |
| explicit

Definition at line 26 of file color_filter.cc.

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

## ◆ ~ColorFilter()

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

## ◆ ColorFilter() [2/2]

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

## Member Function Documentation

## ◆ GetColorFilter()

const std::shared_ptr< const flutter::DlColorFilter > & impeller::interop::ColorFilter::GetColorFilter | ( |  | ) | const

Definition at line 32 of file color_filter.cc.

32 {
33 return filter_;
34 }

Referenced by impeller::interop::Paint::SetColorFilter().

## ◆ MakeBlend()

ScopedObject< ColorFilter > impeller::interop::ColorFilter::MakeBlend | ( | Color | color,
|  | BlendMode | mode
| ) |  |
| static

Definition at line 9 of file color_filter.cc.

9 {
10 auto filter = flutter::DlColorFilter::MakeBlend(ToDisplayListType(color),
11 ToDisplayListType(mode));
12 if (!filter) {
13 return nullptr;
14 }
15 return Create<ColorFilter>(std::move(filter));
16 }
impeller::interop::ToDisplayListType
constexpr flutter::DlColor ToDisplayListType(Color color)
Definition: formats.h:77

References impeller::interop::ToDisplayListType().

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

## ◆ MakeMatrix()

ScopedObject< ColorFilter > impeller::interop::ColorFilter::MakeMatrix | ( | const float | matrix[20] | ) |
| static

Definition at line 18 of file color_filter.cc.

18 {
19 auto filter = flutter::DlColorFilter::MakeMatrix(matrix);
20 if (!filter) {
21 return nullptr;
22 }
23 return Create<ColorFilter>(std::move(filter));
24 }

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

## ◆ operator=()

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

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

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