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 
11 
12 namespace impeller {
13 
14 /// @brief A PathSource that generates the various segments of a dashed line.
16  public:
17  DashedLinePathSource(Point p0, Point p1, Scalar on_length, Scalar off_length);
18 
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_
A PathSource that generates the various segments of a dashed line.
DashedLinePathSource(Point p0, Point p1, Scalar on_length, Scalar off_length)
FillType GetFillType() const override
void Dispatch(PathReceiver &receiver) const override
Collection of functions to receive path segments from the underlying path representation via the DlPa...
Definition: path_source.h:42
float Scalar
Definition: scalar.h:19