#include <color_source.h>
Public Types | |
enum | Type { Type::kColor, Type::kImage, Type::kLinearGradient, Type::kRadialGradient, Type::kConicalGradient, Type::kSweepGradient, Type::kRuntimeEffect, Type::kScene } |
using | ColorSourceProc = std::function< std::shared_ptr< ColorSourceContents >(const Paint &paint)> |
Public Member Functions | |
ColorSource () noexcept | |
~ColorSource () | |
Type | GetType () const |
std::shared_ptr< ColorSourceContents > | GetContents (const Paint &paint) const |
Static Public Member Functions | |
static ColorSource | MakeColor () |
static ColorSource | MakeLinearGradient (Point start_point, Point end_point, std::vector< Color > colors, std::vector< Scalar > stops, Entity::TileMode tile_mode, Matrix effect_transform) |
static ColorSource | MakeConicalGradient (Point center, Scalar radius, std::vector< Color > colors, std::vector< Scalar > stops, Point focus_center, Scalar focus_radius, Entity::TileMode tile_mode, Matrix effect_transform) |
static ColorSource | MakeRadialGradient (Point center, Scalar radius, std::vector< Color > colors, std::vector< Scalar > stops, Entity::TileMode tile_mode, Matrix effect_transform) |
static ColorSource | MakeSweepGradient (Point center, Degrees start_angle, Degrees end_angle, std::vector< Color > colors, std::vector< Scalar > stops, Entity::TileMode tile_mode, Matrix effect_transform) |
static ColorSource | MakeImage (std::shared_ptr< Texture > texture, Entity::TileMode x_tile_mode, Entity::TileMode y_tile_mode, SamplerDescriptor sampler_descriptor, Matrix effect_transform) |
static ColorSource | MakeRuntimeEffect (std::shared_ptr< RuntimeStage > runtime_stage, std::shared_ptr< std::vector< uint8_t >> uniform_data, std::vector< RuntimeEffectContents::TextureInput > texture_inputs) |
Definition at line 28 of file color_source.h.
using impeller::ColorSource::ColorSourceProc = std::function<std::shared_ptr<ColorSourceContents>(const Paint& paint)> |
Definition at line 42 of file color_source.h.
|
strong |
Enumerator | |
---|---|
kColor | |
kImage | |
kLinearGradient | |
kRadialGradient | |
kConicalGradient | |
kSweepGradient | |
kRuntimeEffect | |
kScene |
Definition at line 30 of file color_source.h.
|
noexcept |
Definition at line 32 of file color_source.cc.
|
default |
std::shared_ptr< ColorSourceContents > impeller::ColorSource::GetContents | ( | const Paint & | paint | ) | const |
Definition at line 234 of file color_source.cc.
Referenced by impeller::Paint::CreateContentsForGeometry().
ColorSource::Type impeller::ColorSource::GetType | ( | ) | const |
Definition at line 230 of file color_source.cc.
Referenced by impeller::Canvas::DrawVertices(), and impeller::UseColorSourceContents().
|
static |
Definition at line 41 of file color_source.cc.
Referenced by impeller::DlDispatcher::setColorSource().
|
static |
Definition at line 74 of file color_source.cc.
References kConicalGradient, and impeller::TRect< Scalar >::MakePointBounds().
Referenced by impeller::testing::CanRenderConicalGradientWithDithering(), impeller::DlDispatcher::setColorSource(), impeller::testing::TEST_F(), and impeller::testing::TEST_P().
|
static |
Definition at line 163 of file color_source.cc.
References impeller::TSize< Scalar >::Ceil(), kImage, and impeller::ColorFilterContents::kNo.
Referenced by impeller::DlDispatcher::setColorSource(), and impeller::testing::TEST_P().
|
static |
Definition at line 45 of file color_source.cc.
References kLinearGradient, and impeller::TRect< Scalar >::MakePointBounds().
Referenced by impeller::testing::CanRenderLinearGradientWithDithering(), impeller::DlDispatcher::setColorSource(), and impeller::testing::TEST_P().
|
static |
Definition at line 108 of file color_source.cc.
References kRadialGradient, and impeller::TRect< Scalar >::MakePointBounds().
Referenced by impeller::testing::CanRenderRadialGradientWithDithering(), impeller::DlDispatcher::setColorSource(), and impeller::testing::TEST_P().
|
static |
Definition at line 193 of file color_source.cc.
References kRuntimeEffect.
Referenced by impeller::DlDispatcher::setColorSource(), and impeller::testing::TEST_P().
|
static |
Definition at line 138 of file color_source.cc.
References kSweepGradient.
Referenced by impeller::testing::CanRenderSweepGradientWithDithering(), impeller::DlDispatcher::setColorSource(), and impeller::testing::TEST_P().