Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
SkIntersectionHelper Class Reference

#include <SkIntersectionHelper.h>

Public Types

enum  SegmentType {
  kHorizontalLine_Segment = -1 , kVerticalLine_Segment = 0 , kLine_Segment = SkPath::kLine_Verb , kQuad_Segment = SkPath::kQuad_Verb ,
  kConic_Segment = SkPath::kConic_Verb , kCubic_Segment = SkPath::kCubic_Verb
}
 

Public Member Functions

bool advance ()
 
SkScalar bottom () const
 
const SkPathOpsBoundsbounds () const
 
SkOpContourcontour () const
 
void init (SkOpContour *contour)
 
SkScalar left () const
 
const SkPointpts () const
 
SkScalar right () const
 
SkOpSegmentsegment () const
 
SegmentType segmentType () const
 
bool startAfter (const SkIntersectionHelper &after)
 
SkScalar top () const
 
SkScalar weight () const
 
SkScalar x () const
 
bool xFlipped () const
 
SkScalar y () const
 
bool yFlipped () const
 

Detailed Description

Definition at line 18 of file SkIntersectionHelper.h.

Member Enumeration Documentation

◆ SegmentType

Enumerator
kHorizontalLine_Segment 
kVerticalLine_Segment 
kLine_Segment 
kQuad_Segment 
kConic_Segment 
kCubic_Segment 

Definition at line 20 of file SkIntersectionHelper.h.

Member Function Documentation

◆ advance()

bool SkIntersectionHelper::advance ( )
inline

Definition at line 29 of file SkIntersectionHelper.h.

29 {
30 fSegment = fSegment->next();
31 return fSegment != nullptr;
32 }
SkOpSegment * next() const

◆ bottom()

SkScalar SkIntersectionHelper::bottom ( ) const
inline

Definition at line 34 of file SkIntersectionHelper.h.

34 {
35 return bounds().fBottom;
36 }
const SkPathOpsBounds & bounds() const
SkScalar fBottom
larger y-axis bounds
Definition extension.cpp:17

◆ bounds()

const SkPathOpsBounds & SkIntersectionHelper::bounds ( ) const
inline

Definition at line 38 of file SkIntersectionHelper.h.

38 {
39 return fSegment->bounds();
40 }
const SkPathOpsBounds & bounds() const

◆ contour()

SkOpContour * SkIntersectionHelper::contour ( ) const
inline

Definition at line 42 of file SkIntersectionHelper.h.

42 {
43 return fSegment->contour();
44 }
SkOpContour * contour() const

◆ init()

void SkIntersectionHelper::init ( SkOpContour contour)
inline

Definition at line 46 of file SkIntersectionHelper.h.

46 {
47 fSegment = contour->first();
48 }

◆ left()

SkScalar SkIntersectionHelper::left ( ) const
inline

Definition at line 50 of file SkIntersectionHelper.h.

50 {
51 return bounds().fLeft;
52 }
SkScalar fLeft
smaller x-axis bounds
Definition extension.cpp:14

◆ pts()

const SkPoint * SkIntersectionHelper::pts ( ) const
inline

Definition at line 54 of file SkIntersectionHelper.h.

54 {
55 return fSegment->pts();
56 }
const SkPoint * pts() const

◆ right()

SkScalar SkIntersectionHelper::right ( ) const
inline

Definition at line 58 of file SkIntersectionHelper.h.

58 {
59 return bounds().fRight;
60 }
SkScalar fRight
larger x-axis bounds
Definition extension.cpp:16

◆ segment()

SkOpSegment * SkIntersectionHelper::segment ( ) const
inline

Definition at line 62 of file SkIntersectionHelper.h.

62 {
63 return fSegment;
64 }

◆ segmentType()

SegmentType SkIntersectionHelper::segmentType ( ) const
inline

Definition at line 66 of file SkIntersectionHelper.h.

66 {
67 SegmentType type = (SegmentType) fSegment->verb();
68 if (type != kLine_Segment) {
69 return type;
70 }
71 if (fSegment->isHorizontal()) {
73 }
74 if (fSegment->isVertical()) {
76 }
77 return kLine_Segment;
78 }
SkPath::Verb verb() const
bool isVertical() const
bool isHorizontal() const

◆ startAfter()

bool SkIntersectionHelper::startAfter ( const SkIntersectionHelper after)
inline

Definition at line 80 of file SkIntersectionHelper.h.

80 {
81 fSegment = after.fSegment->next();
82 return fSegment != nullptr;
83 }

◆ top()

SkScalar SkIntersectionHelper::top ( ) const
inline

Definition at line 85 of file SkIntersectionHelper.h.

85 {
86 return bounds().fTop;
87 }
SkScalar fTop
smaller y-axis bounds
Definition extension.cpp:15

◆ weight()

SkScalar SkIntersectionHelper::weight ( ) const
inline

Definition at line 89 of file SkIntersectionHelper.h.

89 {
90 return fSegment->weight();
91 }
SkScalar weight() const

◆ x()

SkScalar SkIntersectionHelper::x ( ) const
inline

Definition at line 93 of file SkIntersectionHelper.h.

93 {
94 return bounds().fLeft;
95 }

◆ xFlipped()

bool SkIntersectionHelper::xFlipped ( ) const
inline

Definition at line 97 of file SkIntersectionHelper.h.

97 {
98 return x() != pts()[0].fX;
99 }
const SkPoint * pts() const
float fX
x-axis value

◆ y()

SkScalar SkIntersectionHelper::y ( ) const
inline

Definition at line 101 of file SkIntersectionHelper.h.

101 {
102 return bounds().fTop;
103 }

◆ yFlipped()

bool SkIntersectionHelper::yFlipped ( ) const
inline

Definition at line 105 of file SkIntersectionHelper.h.

105 {
106 return y() != pts()[0].fY;
107 }
float fY
y-axis value

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