#include <path_component.h>
Public Types | |
| using | PointProc = std::function< void(const Point &point)> |
Public Member Functions | |
| CubicPathComponent () | |
| CubicPathComponent (const QuadraticPathComponent &q) | |
| CubicPathComponent (Point ap1, Point acp1, Point acp2, Point ap2) | |
| Point | Solve (Scalar time) const |
| Point | SolveDerivative (Scalar time) const |
| void | AppendPolylinePoints (Scalar scale, std::vector< Point > &points) const |
| std::vector< Point > | Extrema () const |
| void | ToLinearPathComponents (Scalar scale, const PointProc &proc) const |
| void | ToLinearPathComponents (Scalar scale, VertexWriter &writer) const |
| size_t | CountLinearPathComponents (Scalar scale) const |
| CubicPathComponent | Subsegment (Scalar t0, Scalar t1) const |
| bool | operator== (const CubicPathComponent &other) const |
| std::optional< Vector2 > | GetStartDirection () const |
| std::optional< Vector2 > | GetEndDirection () const |
Public Attributes | |
| Point | p1 |
| Point | cp1 |
| Point | cp2 |
| Point | p2 |
Definition at line 280 of file path_component.h.
| using impeller::CubicPathComponent::PointProc = std::function<void(const Point& point)> |
Definition at line 309 of file path_component.h.
|
inline |
|
inlineexplicit |
Definition at line 292 of file path_component.h.
| void impeller::CubicPathComponent::AppendPolylinePoints | ( | Scalar | scale, |
| std::vector< Point > & | points | ||
| ) | const |
Definition at line 459 of file path_component.cc.
References scale, and ToLinearPathComponents().
Referenced by impeller::Path::CreatePolyline().
| size_t impeller::CubicPathComponent::CountLinearPathComponents | ( | Scalar | scale | ) | const |
Definition at line 475 of file path_component.cc.
References impeller::ComputeCubicSubdivisions(), and scale.
Referenced by impeller::Path::CountStorage().
| std::vector< Point > impeller::CubicPathComponent::Extrema | ( | ) | const |
Definition at line 566 of file path_component.cc.
References cp1, cp2, impeller::CubicPathBoundingPopulateValues(), p1, p2, Solve(), value, impeller::TPoint< T >::x, and impeller::TPoint< T >::y.
Referenced by impeller::QuadraticPathComponent::Extrema(), and impeller::testing::TEST().
| std::optional< Vector2 > impeller::CubicPathComponent::GetEndDirection | ( | ) | const |
Definition at line 597 of file path_component.cc.
References cp1, cp2, p1, and p2.
Referenced by impeller::Path::EndContour().
| std::optional< Vector2 > impeller::CubicPathComponent::GetStartDirection | ( | ) | const |
Definition at line 584 of file path_component.cc.
|
inline |
Definition at line 445 of file path_component.cc.
References cp1, cp2, impeller::CubicSolve(), p1, p2, impeller::TPoint< T >::x, and impeller::TPoint< T >::y.
Referenced by Extrema(), Subsegment(), and ToLinearPathComponents().
Definition at line 452 of file path_component.cc.
References cp1, cp2, impeller::CubicSolveDerivative(), p1, p2, impeller::TPoint< T >::x, and impeller::TPoint< T >::y.
| CubicPathComponent impeller::CubicPathComponent::Subsegment | ( | Scalar | t0, |
| Scalar | t1 | ||
| ) | const |
Definition at line 484 of file path_component.cc.
References CubicPathComponent(), p1, p2, scale, and Solve().
| void impeller::CubicPathComponent::ToLinearPathComponents | ( | Scalar | scale, |
| const PointProc & | proc | ||
| ) | const |
Definition at line 494 of file path_component.cc.
References impeller::ComputeCubicSubdivisions(), p2, scale, and Solve().
Referenced by AppendPolylinePoints(), and impeller::Path::WritePolyline().
| void impeller::CubicPathComponent::ToLinearPathComponents | ( | Scalar | scale, |
| VertexWriter & | writer | ||
| ) | const |
Definition at line 466 of file path_component.cc.
References impeller::ComputeCubicSubdivisions(), p2, scale, Solve(), and impeller::VertexWriter::Write().
| Point impeller::CubicPathComponent::cp1 |
Definition at line 284 of file path_component.h.
Referenced by impeller::ComputeCubicSubdivisions(), Extrema(), GetEndDirection(), GetStartDirection(), operator==(), Solve(), SolveDerivative(), and impeller::testing::TEST().
| Point impeller::CubicPathComponent::cp2 |
Definition at line 286 of file path_component.h.
Referenced by impeller::ComputeCubicSubdivisions(), Extrema(), GetEndDirection(), GetStartDirection(), operator==(), Solve(), SolveDerivative(), and impeller::testing::TEST().
| Point impeller::CubicPathComponent::p1 |
Definition at line 282 of file path_component.h.
Referenced by impeller::ComputeCubicSubdivisions(), Extrema(), GetEndDirection(), GetStartDirection(), operator==(), impeller::PathBuilder::Shift(), Solve(), SolveDerivative(), Subsegment(), impeller::testing::TEST(), and impeller::Path::WritePolyline().
| Point impeller::CubicPathComponent::p2 |
Definition at line 288 of file path_component.h.
Referenced by impeller::ComputeCubicSubdivisions(), Extrema(), GetEndDirection(), GetStartDirection(), operator==(), Solve(), SolveDerivative(), Subsegment(), impeller::testing::TEST(), and ToLinearPathComponents().