File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -306,6 +306,41 @@ test('Gradients with applyMatrix', function() {
306306    comparePixels ( path ,  shape ) ; 
307307} ) ; 
308308
309+ test ( 'Gradients with strokeScaling: false' ,  function ( )  { 
310+     var  topLeft  =  [ 100 ,  100 ] ; 
311+     var  bottomRight  =  [ 400 ,  400 ] ; 
312+     var  gradientColor  =  { 
313+         gradient : { 
314+             stops : [ 'yellow' ,  'red' ,  'blue' ] 
315+         } , 
316+         origin : topLeft , 
317+         destination : bottomRight 
318+     } 
319+ 
320+     var  path  =  new  Shape . Rectangle ( { 
321+         topLeft : topLeft , 
322+         bottomRight : bottomRight , 
323+         fillColor : gradientColor , 
324+         strokeScaling : true 
325+     } ) ; 
326+ 
327+     var  shape  =  new  Shape . Rectangle ( { 
328+         topLeft : topLeft , 
329+         bottomRight : bottomRight , 
330+         fillColor : gradientColor , 
331+         strokeScaling : false 
332+     } ) ; 
333+ 
334+     comparePixels ( path ,  shape ) ; 
335+ 
336+     path . scale ( 2 ) ; 
337+     path . rotate ( 45 ) ; 
338+     shape . scale ( 2 ) ; 
339+     shape . rotate ( 45 ) ; 
340+ 
341+     comparePixels ( path ,  shape ) ; 
342+ } ) 
343+ 
309344test ( 'Modifying group.strokeColor for multiple children' ,  function ( )  { 
310345    var  item  =  new  Group ( new  Path ( ) ,  new  Path ( ) ) ; 
311346    item . strokeColor  =  'red' ; 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments