#include <paint.h>
Classes | |
| struct | MaskBlurDescriptor |
Public Types | |
| enum | Style { Style::kFill, Style::kStroke } |
| using | ImageFilterProc = std::function< std::shared_ptr< FilterContents >(FilterInput::Ref, const Matrix &effect_transform, Entity::RenderingMode rendering_mode)> |
| using | MaskFilterProc = std::function< std::shared_ptr< FilterContents >(FilterInput::Ref, bool is_solid_color, const Matrix &effect_transform)> |
| using | ColorSourceProc = std::function< std::shared_ptr< ColorSourceContents >()> |
Public Member Functions | |
| std::shared_ptr< Contents > | WithFilters (std::shared_ptr< Contents > input) const |
| Wrap this paint's configured filters to the given contents. More... | |
| std::shared_ptr< Contents > | WithFiltersForSubpassTarget (std::shared_ptr< Contents > input, const Matrix &effect_transform=Matrix()) const |
| Wrap this paint's configured filters to the given contents of subpass target. More... | |
| std::shared_ptr< Contents > | CreateContentsForEntity (const Path &path={}, bool cover=false) const |
| std::shared_ptr< Contents > | CreateContentsForGeometry (std::shared_ptr< Geometry > geometry) const |
| bool | HasColorFilter () const |
| Whether this paint has a color filter that can apply opacity. More... | |
| std::shared_ptr< Contents > | WithMaskBlur (std::shared_ptr< Contents > input, bool is_solid_color) const |
| std::shared_ptr< FilterContents > | WithImageFilter (const FilterInput::Variant &input, const Matrix &effect_transform, Entity::RenderingMode rendering_mode) const |
Public Attributes | |
| Color | color = Color::Black() |
| ColorSource | color_source |
| bool | dither = false |
| Scalar | stroke_width = 0.0 |
| Cap | stroke_cap = Cap::kButt |
| Join | stroke_join = Join::kMiter |
| Scalar | stroke_miter = 4.0 |
| Style | style = Style::kFill |
| BlendMode | blend_mode = BlendMode::kSourceOver |
| bool | invert_colors = false |
| std::shared_ptr< ImageFilter > | image_filter |
| std::shared_ptr< ColorFilter > | color_filter |
| std::optional< MaskBlurDescriptor > | mask_blur_descriptor |
| using impeller::Paint::ColorSourceProc = std::function<std::shared_ptr<ColorSourceContents>()> |
| using impeller::Paint::ImageFilterProc = std::function<std::shared_ptr<FilterContents>( FilterInput::Ref, const Matrix& effect_transform, Entity::RenderingMode rendering_mode)> |
| using impeller::Paint::MaskFilterProc = std::function<std::shared_ptr<FilterContents>( FilterInput::Ref, bool is_solid_color, const Matrix& effect_transform)> |
|
strong |
| std::shared_ptr< Contents > impeller::Paint::CreateContentsForEntity | ( | const Path & | path = {}, |
| bool | cover = false |
||
| ) | const |
Definition at line 17 of file paint.cc.
References CreateContentsForGeometry(), kFill, kStroke, impeller::Geometry::MakeCover(), impeller::Geometry::MakeFillPath(), impeller::Geometry::MakeStrokePath(), stroke_cap, stroke_join, stroke_miter, stroke_width, and style.
Referenced by impeller::Canvas::DrawPaint(), and impeller::Canvas::DrawPath().
| std::shared_ptr< Contents > impeller::Paint::CreateContentsForGeometry | ( | std::shared_ptr< Geometry > | geometry | ) | const |
Definition at line 34 of file paint.cc.
References color_filter, color_source, impeller::ColorSource::GetContents(), and mask_blur_descriptor.
Referenced by CreateContentsForEntity(), impeller::Canvas::DrawPoints(), impeller::Canvas::DrawRect(), impeller::Canvas::DrawRRect(), and impeller::Canvas::DrawVertices().
| bool impeller::Paint::HasColorFilter | ( | ) | const |
Whether this paint has a color filter that can apply opacity.
Definition at line 211 of file paint.cc.
References color_filter.
Referenced by impeller::Canvas::DrawImageRect(), and impeller::testing::TEST_P().
Wrap this paint's configured filters to the given contents.
| [in] | input | The contents to wrap with paint's filters. |
Definition at line 59 of file paint.cc.
References image_filter, impeller::Entity::kDirect, impeller::ColorFilterContents::kYes, and WithImageFilter().
Referenced by impeller::Canvas::DrawAtlas(), impeller::Canvas::DrawImageRect(), impeller::Canvas::DrawPath(), impeller::Canvas::DrawPoints(), impeller::Canvas::DrawRect(), impeller::Canvas::DrawRRect(), impeller::Canvas::DrawTextFrame(), and impeller::Canvas::DrawVertices().
| std::shared_ptr< Contents > impeller::Paint::WithFiltersForSubpassTarget | ( | std::shared_ptr< Contents > | input, |
| const Matrix & | effect_transform = Matrix() |
||
| ) | const |
Wrap this paint's configured filters to the given contents of subpass target.
| [in] | input | The contents of subpass target to wrap with paint's filters. |
Definition at line 71 of file paint.cc.
References image_filter, impeller::Entity::kSubpass, impeller::ColorFilterContents::kYes, and WithImageFilter().
Referenced by impeller::PaintPassDelegate::CreateContentsForSubpassTarget().
| std::shared_ptr< FilterContents > impeller::Paint::WithImageFilter | ( | const FilterInput::Variant & | input, |
| const Matrix & | effect_transform, | ||
| Entity::RenderingMode | rendering_mode | ||
| ) | const |
Definition at line 92 of file paint.cc.
References image_filter, and impeller::FilterInput::Make().
Referenced by WithFilters(), WithFiltersForSubpassTarget(), and impeller::PaintPassDelegate::WithImageFilter().
| std::shared_ptr< Contents > impeller::Paint::WithMaskBlur | ( | std::shared_ptr< Contents > | input, |
| bool | is_solid_color | ||
| ) | const |
Definition at line 83 of file paint.cc.
References impeller::FilterInput::Make(), and mask_blur_descriptor.
Referenced by impeller::Canvas::DrawTextFrame().
| BlendMode impeller::Paint::blend_mode = BlendMode::kSourceOver |
Definition at line 63 of file paint.h.
Referenced by impeller::PaintPassDelegate::CanElide(), impeller::OpacityPeepholePassDelegate::CanElide(), impeller::Canvas::DrawAtlas(), impeller::DlDispatcher::drawColor(), impeller::Canvas::DrawImageRect(), impeller::Canvas::DrawPaint(), impeller::Canvas::DrawPath(), impeller::Canvas::DrawPoints(), impeller::Canvas::DrawRect(), impeller::Canvas::DrawRRect(), impeller::Canvas::DrawTextFrame(), impeller::Canvas::DrawVertices(), impeller::Canvas::SaveLayer(), impeller::DlDispatcher::setBlendMode(), and impeller::testing::TEST_P().
| Color impeller::Paint::color = Color::Black() |
Definition at line 54 of file paint.h.
Referenced by impeller::OpacityPeepholePassDelegate::CanCollapseIntoParentPass(), impeller::PaintPassDelegate::CreateContentsForSubpassTarget(), impeller::Canvas::DrawAtlas(), impeller::DlDispatcher::drawColor(), impeller::DlDispatcher::drawDisplayList(), impeller::Canvas::DrawImageRect(), impeller::DlDispatcher::drawShadow(), impeller::Canvas::DrawTextFrame(), impeller::Canvas::DrawVertices(), impeller::DlDispatcher::setColor(), and impeller::testing::TEST_P().
| std::shared_ptr<ColorFilter> impeller::Paint::color_filter |
| ColorSource impeller::Paint::color_source |
Definition at line 55 of file paint.h.
Referenced by impeller::testing::CanRenderConicalGradientWithDithering(), impeller::testing::CanRenderLinearGradientWithDithering(), impeller::testing::CanRenderRadialGradientWithDithering(), impeller::testing::CanRenderSweepGradientWithDithering(), CreateContentsForGeometry(), impeller::Canvas::DrawVertices(), impeller::DlDispatcher::setColorSource(), impeller::testing::TEST_F(), impeller::testing::TEST_P(), and impeller::UseColorSourceContents().
| bool impeller::Paint::dither = false |
Definition at line 56 of file paint.h.
Referenced by impeller::testing::CanRenderConicalGradientWithDithering(), impeller::testing::CanRenderLinearGradientWithDithering(), impeller::testing::CanRenderRadialGradientWithDithering(), impeller::testing::CanRenderSweepGradientWithDithering(), and impeller::DlDispatcher::setDither().
| std::shared_ptr<ImageFilter> impeller::Paint::image_filter |
Definition at line 66 of file paint.h.
Referenced by impeller::OpacityPeepholePassDelegate::CanCollapseIntoParentPass(), impeller::DlDispatcher::setImageFilter(), impeller::testing::TEST_P(), WithFilters(), WithFiltersForSubpassTarget(), and WithImageFilter().
| bool impeller::Paint::invert_colors = false |
Definition at line 64 of file paint.h.
Referenced by impeller::DlDispatcher::setInvertColors(), and impeller::testing::TEST_P().
| std::optional<MaskBlurDescriptor> impeller::Paint::mask_blur_descriptor |
Definition at line 68 of file paint.h.
Referenced by CreateContentsForGeometry(), impeller::DlDispatcher::drawShadow(), impeller::DlDispatcher::setMaskFilter(), impeller::testing::TEST_P(), and WithMaskBlur().
| Cap impeller::Paint::stroke_cap = Cap::kButt |
Definition at line 59 of file paint.h.
Referenced by CreateContentsForEntity(), impeller::DlDispatcher::drawPoints(), impeller::DlDispatcher::setStrokeCap(), and impeller::testing::TEST_P().
| Join impeller::Paint::stroke_join = Join::kMiter |
Definition at line 60 of file paint.h.
Referenced by CreateContentsForEntity(), impeller::DlDispatcher::setStrokeJoin(), and impeller::testing::TEST_P().
| Scalar impeller::Paint::stroke_miter = 4.0 |
Definition at line 61 of file paint.h.
Referenced by CreateContentsForEntity(), and impeller::DlDispatcher::setStrokeMiter().
| Scalar impeller::Paint::stroke_width = 0.0 |
Definition at line 58 of file paint.h.
Referenced by CreateContentsForEntity(), impeller::DlDispatcher::drawPoints(), impeller::DlDispatcher::setStrokeWidth(), impeller::testing::TEST_F(), and impeller::testing::TEST_P().
| Style impeller::Paint::style = Style::kFill |
Definition at line 62 of file paint.h.
Referenced by CreateContentsForEntity(), impeller::Paint::MaskBlurDescriptor::CreateMaskBlur(), impeller::DlDispatcher::drawLine(), impeller::DlDispatcher::drawPoints(), impeller::Canvas::DrawRect(), impeller::Canvas::DrawRRect(), impeller::DlDispatcher::drawShadow(), impeller::DlDispatcher::setDrawStyle(), impeller::testing::TEST_F(), and impeller::testing::TEST_P().