Language \ Environment \ Comparison
 
Index
 
  The Processing 1.0 _ALPHA_ Reference is a work in progress.
If you see any errors or have any comments, please write to: reas at groupc.net
Name  

set()

   
Examples  
color black = color(0, 0, 0); 
set(30, 20, black); 
set(85, 20, black); 
set(85, 75, black); 
set(30, 75, black); 
for (int i=30; i<(width-15); i++) { 
  for(int j=20; j<(height-25); j++) { 
    color c = color(204-j, 153-i, 0); 
    set(i, j, c); 
  } 
} 
Description   Provides a way to change the color of any pixel or to write an image directly into the display window pixels. The x and y parameter specify the pixel to change and the color parameter specifies the color value. The default color mode is RGB with numbers scaled from 0 to 255. Images can be written directly into the display window by specifying an image parameter.
   
Syntax  
set(x, y, color)
set(x, y, image)
   
Parameters  
x   int: x-coordinate of the pixel

y   int: y-coordinate of the pixel

color   color: any value of the color datatype

image   BImage: any valid BImage

   
Returns   None
   
Usage   Web & Application
   
Related   get()
pixels[]
   
© 2004 - 2001 Massachusetts Institute of Technology and Interaction Design Institute Ivrea
Processing is an open project initiated by Ben Fry and Casey Reas