| Flutter Impeller |

dashed_line_path_source.h
Go to the documentation of this file.
1 // Copyright 2013 The Flutter Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef FLUTTER_IMPELLER_GEOMETRY_DASHED_LINE_PATH_SOURCE_H_
6 #define FLUTTER_IMPELLER_GEOMETRY_DASHED_LINE_PATH_SOURCE_H_
7
8 #include "flutter/impeller/geometry/path_source.h"
9 #include "flutter/impeller/geometry/point.h"
10 #include "flutter/impeller/geometry/scalar.h"
11
12 namespace impeller {
13
14 /// @brief A PathSource that generates the various segments of a dashed line.
15 class DashedLinePathSource : public PathSource {
16 public:
17 DashedLinePathSource(Point p0, Point p1, Scalar on_length, Scalar off_length);
18
19 ~DashedLinePathSource();
20
21 // |PathSource|
22 FillType GetFillType() const override;
23
24 // |PathSource|
25 Rect GetBounds() const override;
26
27 // |PathSource|
28 bool IsConvex() const override;
29
30 // |PathSource|
31 void Dispatch(PathReceiver& receiver) const override;
32
33 private:
34 const Point p0_;
35 const Point p1_;
36 const Scalar on_length_;
37 const Scalar off_length_;
38 };
39
40 } // namespace impeller
41
42 #endif // FLUTTER_IMPELLER_GEOMETRY_DASHED_LINE_PATH_SOURCE_H_
impeller::DashedLinePathSource
A PathSource that generates the various segments of a dashed line.
Definition: dashed_line_path_source.h:15
impeller::DashedLinePathSource::DashedLinePathSource
DashedLinePathSource(Point p0, Point p1, Scalar on_length, Scalar off_length)
Definition: dashed_line_path_source.cc:9
impeller::DashedLinePathSource::IsConvex
bool IsConvex() const override
Definition: dashed_line_path_source.cc:25
impeller::DashedLinePathSource::GetFillType
FillType GetFillType() const override
Definition: dashed_line_path_source.cc:17
impeller::DashedLinePathSource::GetBounds
Rect GetBounds() const override
Definition: dashed_line_path_source.cc:21
impeller::DashedLinePathSource::~DashedLinePathSource
~DashedLinePathSource()
impeller::DashedLinePathSource::Dispatch
void Dispatch(PathReceiver &receiver) const override
Definition: dashed_line_path_source.cc:29
impeller::PathReceiver
Collection of functions to receive path segments from the underlying path representation via the DlPa...
Definition: path_source.h:42
impeller::PathSource
Definition: path_source.h:55
impeller
Definition: allocation.cc:12
impeller::Scalar
float Scalar
Definition: scalar.h:19
impeller::FillType
FillType
Definition: path_source.h:13
path_source.h
point.h
p1
Point p1
Definition: round_superellipse_param.cc:313
scalar.h
impeller::TPoint< Scalar >
impeller::TRect< Scalar >