@@ -33,25 +33,25 @@ mod tests {
3333
3434 let vectors = & shapes[ 0 ] [ 0 ] ;
3535 let template = [
36- VectorEdge {
37- a : IntPoint :: new ( -10240 , -10240 ) ,
38- b : IntPoint :: new ( -10240 , 10240 ) ,
39- fill : 2
40- } ,
4136 VectorEdge {
4237 a : IntPoint :: new ( -10240 , 10240 ) ,
43- b : IntPoint :: new ( 10240 , 10240 ) ,
44- fill : 2
38+ b : IntPoint :: new ( - 10240 , - 10240 ) ,
39+ fill : 1
4540 } ,
4641 VectorEdge {
47- a : IntPoint :: new ( 10240 , 10240 ) ,
42+ a : IntPoint :: new ( - 10240 , - 10240 ) ,
4843 b : IntPoint :: new ( 10240 , -10240 ) ,
49- fill : 2
44+ fill : 1
5045 } ,
5146 VectorEdge {
5247 a : IntPoint :: new ( 10240 , -10240 ) ,
53- b : IntPoint :: new ( -10240 , -10240 ) ,
54- fill : 2
48+ b : IntPoint :: new ( 10240 , 10240 ) ,
49+ fill : 1
50+ } ,
51+ VectorEdge {
52+ a : IntPoint :: new ( 10240 , 10240 ) ,
53+ b : IntPoint :: new ( -10240 , 10240 ) ,
54+ fill : 1
5555 }
5656 ] ;
5757
@@ -78,42 +78,42 @@ mod tests {
7878 overlay. add_contour ( & subj, ShapeType :: Subject ) ;
7979 overlay. add_contour ( & clip, ShapeType :: Clip ) ;
8080
81- let shapes = overlay. build_shape_vectors ( FillRule :: NonZero , OverlayRule :: Subject ) ;
81+ let shapes = overlay. build_shape_vectors ( FillRule :: NonZero , OverlayRule :: Difference ) ;
8282
8383 assert_eq ! ( shapes. len( ) , 1 ) ;
8484 assert_eq ! ( shapes[ 0 ] . len( ) , 1 ) ;
8585
8686 let vectors = & shapes[ 0 ] [ 0 ] ;
8787 let template = [
88- VectorEdge {
89- a : IntPoint :: new ( -10240 , -10240 ) ,
90- b : IntPoint :: new ( -10240 , 10240 ) ,
91- fill : 2
92- } ,
9388 VectorEdge {
9489 a : IntPoint :: new ( -10240 , 10240 ) ,
95- b : IntPoint :: new ( -5120 , 10240 ) ,
96- fill : 2
90+ b : IntPoint :: new ( -10240 , - 10240 ) ,
91+ fill : 1
9792 } ,
9893 VectorEdge {
99- a : IntPoint :: new ( -5120 , 10240 ) ,
100- b : IntPoint :: new ( 10240 , 10240 ) ,
101- fill : 14
94+ a : IntPoint :: new ( -10240 , - 10240 ) ,
95+ b : IntPoint :: new ( 10240 , - 10240 ) ,
96+ fill : 1
10297 } ,
10398 VectorEdge {
104- a : IntPoint :: new ( 10240 , 10240 ) ,
99+ a : IntPoint :: new ( 10240 , - 10240 ) ,
105100 b : IntPoint :: new ( 10240 , -5120 ) ,
106- fill : 14
101+ fill : 1
107102 } ,
108103 VectorEdge {
109104 a : IntPoint :: new ( 10240 , -5120 ) ,
110- b : IntPoint :: new ( 10240 , - 10240 ) ,
111- fill : 2
105+ b : IntPoint :: new ( - 5120 , - 5120 ) ,
106+ fill : 11
112107 } ,
113108 VectorEdge {
114- a : IntPoint :: new ( 10240 , -10240 ) ,
115- b : IntPoint :: new ( -10240 , -10240 ) ,
116- fill : 2
109+ a : IntPoint :: new ( -5120 , -5120 ) ,
110+ b : IntPoint :: new ( -5120 , 10240 ) ,
111+ fill : 11
112+ } ,
113+ VectorEdge {
114+ a : IntPoint :: new ( -5120 , 10240 ) ,
115+ b : IntPoint :: new ( -10240 , 10240 ) ,
116+ fill : 1
117117 }
118118 ] ;
119119
0 commit comments