xref: /aosp_15_r20/external/skia/src/core/SkPathMeasurePriv.h (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
1 /*
2  * Copyright 2016 Google Inc.
3  *
4  * Use of this source code is governed by a BSD-style license that can be
5  * found in the LICENSE file.
6  */
7 
8 #ifndef SkPathMeasurePriv_DEFINED
9 #define SkPathMeasurePriv_DEFINED
10 
11 #include "include/core/SkPath.h"
12 #include "include/core/SkPoint.h"
13 #include "src/core/SkGeometry.h"
14 
15 // Used in the Segment struct defined in SkPathMeasure.h
16 // It is used as a 2-bit field so if you add to this
17 // you must increase the size of the bitfield there.
18 enum SkSegType {
19     kLine_SegType,
20     kQuad_SegType,
21     kCubic_SegType,
22     kConic_SegType,
23 };
24 
25 
26 void SkPathMeasure_segTo(const SkPoint pts[], unsigned segType,
27                    SkScalar startT, SkScalar stopT, SkPath* dst);
28 
29 // for testing
30 
31 class SkPathMeasure;
32 
33 class SkPathMeasurePriv {
34 public:
35     static size_t CountSegments(const SkPathMeasure&);
36 };
37 
38 #endif  // SkPathMeasurePriv_DEFINED
39