MCPcopy Create free account
hub / github.com/tdewolff/canvas / compareOverlapsV

Method compareOverlapsV

path_intersection.go:1031–1051  ·  view source on GitHub ↗
(b *SweepPoint)

Source from the content-addressed store, hash-verified

1029}
1030
1031func (a *SweepPoint) compareOverlapsV(b *SweepPoint) int {
1032 // compare segments vertically that overlap (ie. are the same)
1033 if a.clipping != b.clipping {
1034 // clipping path is virtually on top (or left if vertical) of subject
1035 if b.clipping {
1036 return -1
1037 } else {
1038 return 1
1039 }
1040 }
1041
1042 // higher segment index is virtually on top
1043 if a.segment != b.segment {
1044 if a.segment < b.segment {
1045 return -1
1046 } else {
1047 return 1
1048 }
1049 }
1050 return 0
1051}
1052
1053func (a *SweepPoint) compareTangentsV(b *SweepPoint) int {
1054 // compare segments vertically at a.X, b.X <= a.X, and a and b coincide at (a.X,a.Y)

Callers 1

compareTangentsVMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected