| 1029 | } |
| 1030 | |
| 1031 | func (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 | |
| 1053 | func (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) |