#include <shadow_path_geometry.h>
Public Member Functions | |
| ShadowPathGeometry (Tessellator &tessellator, const Matrix &matrix, const PathSource &source, Scalar occluder_height) | |
| bool | CanRender () const |
| bool | IsEmpty () const |
| Returns true if this shadow has no effect, is not visible. | |
| const std::shared_ptr< ShadowVertices > & | GetShadowVertices () const |
| const std::shared_ptr< ShadowVertices > | TakeShadowVertices () |
Static Public Member Functions | |
| static std::shared_ptr< ShadowVertices > | MakeAmbientShadowVertices (Tessellator &tessellator, const PathSource &source, Scalar occluder_height, const Matrix &matrix) |
A class to compute and return the |ShadowVertices| for a path source viewed under a given transform. The |occluder_height| is measured in device pixels. The geometry of the |PathSource| is transformed by the indicated matrix to produce a device space set of vertices, and the shadow mesh is inset and outset by the indicated |occluder_height| without any adjustment for the matrix. The results are un-transformed and returned back iin the |ShadowVertices| in the original coordinate system.
Definition at line 80 of file shadow_path_geometry.h.
| impeller::ShadowPathGeometry::ShadowPathGeometry | ( | Tessellator & | tessellator, |
| const Matrix & | matrix, | ||
| const PathSource & | source, | ||
| Scalar | occluder_height | ||
| ) |
Definition at line 1389 of file shadow_path_geometry.cc.
| bool impeller::ShadowPathGeometry::CanRender | ( | ) | const |
Definition at line 1398 of file shadow_path_geometry.cc.
| const std::shared_ptr< ShadowVertices > & impeller::ShadowPathGeometry::GetShadowVertices | ( | ) | const |
Returns a reference to the generated vertices, or null if the algorithm failed to produce a mesh.
Definition at line 1406 of file shadow_path_geometry.cc.
| bool impeller::ShadowPathGeometry::IsEmpty | ( | ) | const |
Returns true if this shadow has no effect, is not visible.
Definition at line 1402 of file shadow_path_geometry.cc.
|
static |
Constructs a shadow mesh for the given |PathSource| at the given |matrix| and with the indicated device-space |occluder_height|. The tessellator is used to get a cached set of |Trigs| for the radii associated with the mesh around various corners in the path.
Definition at line 1454 of file shadow_path_geometry.cc.
References impeller::Tessellator::GetTrigsForDeviceRadius().
Referenced by impeller::BM_ShadowPathVerticesImpeller(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), and impeller::testing::TEST().
| const std::shared_ptr< ShadowVertices > impeller::ShadowPathGeometry::TakeShadowVertices | ( | ) |
Takes (returns the only copy of via std::move) the shadow vertices or null if the algorithm failed to produce a mesh.
Definition at line 1411 of file shadow_path_geometry.cc.