Flutter Engine
 
Loading...
Searching...
No Matches
flutter::DlPathBuilder Class Reference

#include <dl_path_builder.h>

Public Member Functions

DlPathBuilderSetFillType (DlPathFillType fill_type)
 Set the fill type that should be used to determine the interior of this path to the indicated |fill_type|.
 
DlPathBuilderMoveTo (DlPoint p2)
 Start a new contour that will originate at the indicated point p2.
 
DlPathBuilderLineTo (DlPoint p2)
 Draw a line from the current point to the indicated point p2.
 
DlPathBuilderQuadraticCurveTo (DlPoint cp, DlPoint p2)
 Draw a quadratic bezier curve from the current point to the indicated point p2, using the indicated point cp as a control point.
 
DlPathBuilderConicCurveTo (DlPoint cp, DlPoint p2, DlScalar weight)
 Draw a conic curve (a rational quadratic bezier curve) from the current point to the indicated point p2, using the indicated point cp as a control point and the indicated weight to control the contribution of the control point.
 
DlPathBuilderCubicCurveTo (DlPoint cp1, DlPoint cp2, DlPoint p2)
 Draw a cubic bezier curve from the current point to the indicated point p2, using the indicated points cp1 and cp2 as control points.
 
DlPathBuilderClose ()
 The path is closed back to the location of the most recent MoveTo call. Contours that are filled are always implicitly assumed to be closed, but contours that are stroked will either:
 
DlPathBuilderAddRect (const DlRect &rect)
 Append a closed rectangular contour to the path.
 
DlPathBuilderAddOval (const DlRect &bounds)
 Append a closed elliptical contour to the path inscribed in the provided bounds.
 
DlPathBuilderAddCircle (DlPoint center, DlScalar radius)
 Append a closed circular contour to the path centered on the provided point at the provided radius.
 
DlPathBuilderAddRoundRect (const DlRoundRect &round_rect)
 Append a closed rounded rect contour to the path.
 
DlPathBuilderAddRoundSuperellipse (const DlRoundSuperellipse &rse)
 Append a closed rounded super-ellipse contour to the path.
 
DlPathBuilderAddArc (const DlRect &bounds, DlDegrees start, DlDegrees sweep, bool use_center=false)
 Append an arc contour to the path which:
 
DlPathBuilderAddPath (const DlPath &path)
 Append the provided path to this path as if the commands used to construct it were repeated on this path. The fill type of the current path will continue to be used, ignoring the fill type of the indicated path.
 
const DlPath CopyPath ()
 Returns the path constructed by this path builder so far and retains all current geometry to continue building the path.
 
const DlPath TakePath ()
 Returns the path constructed by this path builder and resets its internal state to the default state when it was constructed.
 

Static Public Attributes

static constexpr const DlScalar kArcApproximationMagic = 0.551915024494f
 

Detailed Description

Definition at line 14 of file dl_path_builder.h.

Member Function Documentation

◆ AddArc()

DlPathBuilder & flutter::DlPathBuilder::AddArc ( const DlRect bounds,
DlDegrees  start,
DlDegrees  sweep,
bool  use_center = false 
)

Append an arc contour to the path which:

  • is a portion of an ellipse inscribed in the provided bounds starting at the indicated angle and sweeping by the indicated sweep, clockwise for positive sweeps or counter-clockwise for negative sweeps.
  • if use_center is false, starts and ends on the ellipse at the specified angles forming a portion of the ellipse sliced at the indicated angles.
  • if use_center is false, starts and ends at the center of the ellipse forming a pie or pacman shape depending on how large the sweep is.

Definition at line 129 of file dl_path_builder.cc.

132 {
133 if (use_center) {
134 path_.moveTo(ToSkPoint(bounds.GetCenter()));
135 }
136 path_.arcTo(ToSkRect(bounds), start.degrees, sweep.degrees, !use_center);
137 if (use_center) {
138 path_.close();
139 }
140 return *this;
141}
const SkPoint & ToSkPoint(const DlPoint &point)
const SkRect & ToSkRect(const DlRect &rect)
const size_t start

References impeller::Degrees::degrees, impeller::TRect< T >::GetCenter(), start, flutter::ToSkPoint(), flutter::ToSkRect(), and use_center.

Referenced by flutter::testing::TEST(), flutter::testing::TEST(), and impeller::testing::TEST_P().

◆ AddCircle()

DlPathBuilder & flutter::DlPathBuilder::AddCircle ( DlPoint  center,
DlScalar  radius 
)

Append a closed circular contour to the path centered on the provided point at the provided radius.

Definition at line 110 of file dl_path_builder.cc.

110 {
111 path_.addCircle(center.x, center.y, radius);
112 return *this;
113}

Referenced by flutter::testing::CanvasCompareTester::RenderWithClips(), flutter::testing::TEST(), and impeller::testing::TEST_P().

◆ AddOval()

DlPathBuilder & flutter::DlPathBuilder::AddOval ( const DlRect bounds)

Append a closed elliptical contour to the path inscribed in the provided bounds.

Definition at line 105 of file dl_path_builder.cc.

105 {
106 path_.addOval(ToSkRect(bounds));
107 return *this;
108}

References flutter::ToSkRect().

Referenced by flutter::testing::TEST(), and flutter::testing::TEST().

◆ AddPath()

DlPathBuilder & flutter::DlPathBuilder::AddPath ( const DlPath path)

Append the provided path to this path as if the commands used to construct it were repeated on this path. The fill type of the current path will continue to be used, ignoring the fill type of the indicated path.

Definition at line 143 of file dl_path_builder.cc.

143 {
144 path_.addPath(path.GetSkPath());
145 return *this;
146}
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir path
Definition switch_defs.h:52

References flutter::path.

Referenced by flutter::testing::TEST(), flutter::testing::TEST(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), and impeller::testing::TEST_P().

◆ AddRect()

DlPathBuilder & flutter::DlPathBuilder::AddRect ( const DlRect rect)

Append a closed rectangular contour to the path.

Definition at line 100 of file dl_path_builder.cc.

100 {
101 path_.addRect(ToSkRect(rect));
102 return *this;
103}

References flutter::ToSkRect().

Referenced by flutter::testing::CanvasCompareTester::RenderWithClips(), flutter::testing::TEST(), flutter::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), and flutter::testing::TEST_F().

◆ AddRoundRect()

DlPathBuilder & flutter::DlPathBuilder::AddRoundRect ( const DlRoundRect round_rect)

Append a closed rounded rect contour to the path.

Definition at line 115 of file dl_path_builder.cc.

115 {
116 path_.addRRect(ToSkRRect(round_rect));
117 return *this;
118}
const SkRRect ToSkRRect(const DlRoundRect &round_rect)

References flutter::ToSkRRect().

Referenced by flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), and flutter::testing::TEST_F().

◆ AddRoundSuperellipse()

DlPathBuilder & flutter::DlPathBuilder::AddRoundSuperellipse ( const DlRoundSuperellipse rse)

Append a closed rounded super-ellipse contour to the path.

Definition at line 120 of file dl_path_builder.cc.

121 {
122 BuilderReceiver receiver(*this);
124 rse.GetRadii())
125 .Dispatch(receiver);
126 return *this;
127}
static RoundSuperellipseParam MakeBoundsRadii(const Rect &bounds, const RoundingRadii &radii)
void Dispatch(PathReceiver &receiver) const

References impeller::RoundSuperellipseParam::Dispatch(), impeller::RoundSuperellipse::GetBounds(), impeller::RoundSuperellipse::GetRadii(), and impeller::RoundSuperellipseParam::MakeBoundsRadii().

Referenced by flutter::CanvasPath::addRSuperellipse(), flutter::DlPath::MakeRoundSuperellipse(), and flutter::testing::TEST().

◆ Close()

DlPathBuilder & flutter::DlPathBuilder::Close ( )

The path is closed back to the location of the most recent MoveTo call. Contours that are filled are always implicitly assumed to be closed, but contours that are stroked will either:

  • If closed, draw the stroke back to the contour origin and insert a join decoration back to the leading vertex of the contour's first segment.
  • If not closed, draw cap decorations at the first and last vertices in the contour.

Definition at line 95 of file dl_path_builder.cc.

95 {
96 path_.close();
97 return *this;
98}

Referenced by impeller::Close(), flutter::testing::GetConicsPath(), flutter::testing::GetCubicsPath(), flutter::testing::GetLinesPath(), flutter::testing::GetQuadsPath(), impeller::testing::MaskBlurVariantTest(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::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(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), and impeller::testing::TEST_P().

◆ ConicCurveTo()

DlPathBuilder & flutter::DlPathBuilder::ConicCurveTo ( DlPoint  cp,
DlPoint  p2,
DlScalar  weight 
)

Draw a conic curve (a rational quadratic bezier curve) from the current point to the indicated point p2, using the indicated point cp as a control point and the indicated weight to control the contribution of the control point.

A weight of less than 0, or NaN, is treated is if it were 0 which produces a curve that is identical to a line segment and will be inserted as a line segment in lieu of the conic.

A weight of (sqrt(2)/2) will produce a quarter section of an elliptical path.

A weight of 1.0 is identical to a quadratic bezier curve and will be inserted as a quadratic curve in lieu of the conic.

If the path is empty, a new contour will automatically be started from the point (0, 0) as if |MoveTo| had been called.

Definition at line 74 of file dl_path_builder.cc.

76 {
77 // Skia's SkPath object used to do these checks, but SkPathBuilder does not.
78 if (!(weight > 0)) {
79 return this->LineTo(p2);
80 } else if (!std::isfinite(weight)) {
81 this->LineTo(cp);
82 return this->LineTo(p2);
83 }
84 path_.conicTo({cp.x, cp.y}, {p2.x, p2.y}, weight);
85 return *this;
86}
DlPathBuilder & LineTo(DlPoint p2)
Draw a line from the current point to the indicated point p2.

References LineTo(), impeller::TPoint< T >::x, and impeller::TPoint< T >::y.

Referenced by flutter::testing::GetConicsPath(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::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_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), and flutter::testing::TestImpellerPathDispatchConicToQuads().

◆ CopyPath()

const DlPath flutter::DlPathBuilder::CopyPath ( )

Returns the path constructed by this path builder so far and retains all current geometry to continue building the path.

Definition at line 148 of file dl_path_builder.cc.

148 {
149 return DlPath(path_.snapshot());
150}
flutter::DlPath DlPath

Referenced by impeller::Tessellate(), and flutter::testing::TEST().

◆ CubicCurveTo()

DlPathBuilder & flutter::DlPathBuilder::CubicCurveTo ( DlPoint  cp1,
DlPoint  cp2,
DlPoint  p2 
)

Draw a cubic bezier curve from the current point to the indicated point p2, using the indicated points cp1 and cp2 as control points.

If the path is empty, a new contour will automatically be started from the point (0, 0) as if |MoveTo| had been called.

Definition at line 88 of file dl_path_builder.cc.

90 {
91 path_.cubicTo({cp1.x, cp1.y}, {cp2.x, cp2.y}, {p2.x, p2.y});
92 return *this;
93}

References impeller::TPoint< T >::x, and impeller::TPoint< T >::y.

Referenced by impeller::CubicTo(), flutter::testing::GetCubicsPath(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), flutter::testing::TEST_F(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), and flutter::testing::TEST_P().

◆ LineTo()

DlPathBuilder & flutter::DlPathBuilder::LineTo ( DlPoint  p2)

Draw a line from the current point to the indicated point p2.

If the path is empty, a new contour will automatically be started from the point (0, 0) as if |MoveTo| had been called.

Definition at line 64 of file dl_path_builder.cc.

64 {
65 path_.lineTo({p2.x, p2.y});
66 return *this;
67}

References impeller::TPoint< T >::x, and impeller::TPoint< T >::y.

Referenced by ConicCurveTo(), flutter::testing::GetLinesPath(), impeller::LineTo(), impeller::testing::MaskBlurVariantTest(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::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(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), flutter::testing::TEST_P(), flutter::testing::TEST_P(), impeller::testing::TEST_P(), and impeller::testing::TEST_P().

◆ MoveTo()

DlPathBuilder & flutter::DlPathBuilder::MoveTo ( DlPoint  p2)

Start a new contour that will originate at the indicated point p2.

Definition at line 59 of file dl_path_builder.cc.

59 {
60 path_.moveTo({p2.x, p2.y});
61 return *this;
62}

References impeller::TPoint< T >::x, and impeller::TPoint< T >::y.

Referenced by flutter::testing::GetConicsPath(), flutter::testing::GetCubicsPath(), flutter::testing::GetLinesPath(), flutter::testing::GetQuadsPath(), impeller::testing::MaskBlurVariantTest(), impeller::MoveTo(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::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(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), flutter::testing::TEST_P(), flutter::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), and flutter::testing::TestImpellerPathDispatchConicToQuads().

◆ QuadraticCurveTo()

DlPathBuilder & flutter::DlPathBuilder::QuadraticCurveTo ( DlPoint  cp,
DlPoint  p2 
)

Draw a quadratic bezier curve from the current point to the indicated point p2, using the indicated point cp as a control point.

If the path is empty, a new contour will automatically be started from the point (0, 0) as if |MoveTo| had been called.

Definition at line 69 of file dl_path_builder.cc.

69 {
70 path_.quadTo({cp.x, cp.y}, {p2.x, p2.y});
71 return *this;
72}

References impeller::TPoint< T >::x, and impeller::TPoint< T >::y.

Referenced by flutter::testing::GetQuadsPath(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::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_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), and impeller::testing::TEST_P().

◆ SetFillType()

DlPathBuilder & flutter::DlPathBuilder::SetFillType ( DlPathFillType  fill_type)

Set the fill type that should be used to determine the interior of this path to the indicated |fill_type|.

See also
|DlPathFillType|

Definition at line 54 of file dl_path_builder.cc.

54 {
55 path_.setFillType(ToSkFillType(fill_type));
56 return *this;
57}

Referenced by flutter::testing::CanvasCompareTester::RenderWithClips(), impeller::Tessellate(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), impeller::testing::TEST(), flutter::testing::TEST_F(), impeller::testing::TEST_P(), and impeller::testing::TEST_P().

◆ TakePath()

const DlPath flutter::DlPathBuilder::TakePath ( )

Returns the path constructed by this path builder and resets its internal state to the default state when it was constructed.

Definition at line 152 of file dl_path_builder.cc.

152 {
153 return DlPath(path_.detach());
154}

Referenced by flutter::CanvasPath::addRSuperellipse(), flutter::testing::BM_DrawPath(), flutter::testing::BM_DrawShadow(), flutter::DlPath::MakeRoundSuperellipse(), impeller::testing::MaskBlurVariantTest(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::testing::TEST(), flutter::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(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), impeller::testing::TEST(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), flutter::testing::TEST_F(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), flutter::testing::TEST_P(), flutter::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), impeller::testing::TEST_P(), and flutter::testing::TestImpellerPathDispatchConicToQuads().

Member Data Documentation

◆ kArcApproximationMagic

constexpr const DlScalar flutter::DlPathBuilder::kArcApproximationMagic = 0.551915024494f
staticconstexpr

Used for approximating quarter circle arcs with cubic curves. This is the control point distance which results in the smallest possible unit circle integration for a right angle arc. It can be used to approximate arcs less than 90 degrees to great effect by simply reducing it proportionally to the angle. However, accuracy rapidly diminishes if magnified for obtuse angle arcs, and so multiple cubic curves should be used when approximating arcs greater than 90 degrees.

Definition at line 23 of file dl_path_builder.h.

Referenced by impeller::testing::TEST_P(), impeller::testing::TEST_P(), and flutter::testing::TEST_P().


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