Filling a custom shape with one color?
              in 
             Programming Questions 
              •  
              2 years ago    
            
 
           
             Hi,
            
            
I've checked the reference already but I've not seen something like a vector filling function. Just the basic shapes.
            
What I'm looking for are functions like those I know from AS3.
            
i.e.:
            
this.beginFill(0x000000,1); //starts a fill with black at 100% opacity
this.moveTo(0,0); // sets the pointer to 0,0
            
// this fills a 10px square with black
this.lineTo(10,0);
this.lineTo(10,10);
this.lineTo(0,10);
this.lineTo(0,0);
            
this.endFill(); // ends the filling
            
This little function would give me a 10px vector square shape.
            
How do I do something like this in Processing?
            
Thanks
leerraum
            
            
 
           
 
            
           I've checked the reference already but I've not seen something like a vector filling function. Just the basic shapes.
What I'm looking for are functions like those I know from AS3.
i.e.:
this.beginFill(0x000000,1); //starts a fill with black at 100% opacity
this.moveTo(0,0); // sets the pointer to 0,0
// this fills a 10px square with black
this.lineTo(10,0);
this.lineTo(10,10);
this.lineTo(0,10);
this.lineTo(0,0);
this.endFill(); // ends the filling
This little function would give me a 10px vector square shape.
How do I do something like this in Processing?
Thanks
leerraum
 
              
              1  
            
 
            