File tree Expand file tree Collapse file tree 2 files changed +2
-30
lines changed Expand file tree Collapse file tree 2 files changed +2
-30
lines changed Original file line number Diff line number Diff line change 11[package ]
22name  = " rasterize" 
3- version  = " 0.6.6 " 
3+ version  = " 0.6.7 " 
44authors  = [" Pavel Aslanov <asl.pavel@gmail.com>" 
55description  = " Simple and small 2D rendering library" 
66edition  = " 2024" 
Original file line number Diff line number Diff line change @@ -873,34 +873,6 @@ impl Curve for Cubic {
873873    } 
874874} 
875875
876- pub  struct  CubicFlattenIter  { 
877-     flatness :  Scalar , 
878-     cubics :  Vec < Cubic > , 
879- } 
880- 
881- impl  Iterator  for  CubicFlattenIter  { 
882-     type  Item  = Line ; 
883- 
884-     fn  next ( & mut  self )  -> Option < Self :: Item >  { 
885-         loop  { 
886-             match  self . cubics . pop ( )  { 
887-                 None  => { 
888-                     return  None ; 
889-                 } 
890-                 Some ( cubic)  if  cubic. flatness ( )  < self . flatness  => { 
891-                     let  Cubic ( [ p0,  _p1,  _p2,  p3] )  = cubic; 
892-                     return  Some ( Line ( [ p0,  p3] ) ) ; 
893-                 } 
894-                 Some ( cubic)  => { 
895-                     let  ( c0,  c1)  = cubic. split ( ) ; 
896-                     self . cubics . push ( c1) ; 
897-                     self . cubics . push ( c0) ; 
898-                 } 
899-             } 
900-         } 
901-     } 
902- } 
903- 
904876impl  From < Quad >  for  Cubic  { 
905877    fn  from ( quad :  Quad )  -> Self  { 
906878        let  Quad ( [ p0,  p1,  p2] )  = quad; 
@@ -1452,7 +1424,7 @@ fn cubic_offset_should_split(cubic: Cubic) -> bool {
14521424        return  true ; 
14531425    } 
14541426    // distance between center mass and midpoint of a curve, 
1455-     // should be bigger then  0.1 of the bounding box diagonal 
1427+     // should be bigger than  0.1 of the bounding box diagonal 
14561428    let  c_mass = ( p0 + p1 + p2 + p3)  / 4.0 ; 
14571429    let  c_mid = cubic. at ( 0.5 ) ; 
14581430    let  dist = ( c_mass - c_mid) . length ( ) ; 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments