言語 環境比較
 
Index
 
  Processing 1.0 _ALPHAリファレンスは開発途中である。
もしエラーやコメントがあれば、reas at groupc.netへメールして下さい。
Name  

get()

   
Examples  
void loop() { 
  for(int i=0; i<height; i++) { 
    stroke(i*2); 
    line(0, i, 50, i); 
  } 
  color c = get(mouseX, mouseY); 
  noStroke(); 
  fill(c); 
  rect(50, 0, 50, 100); 
} 
Description   あらゆるピクセルの色でも読み込むことのできる方法。返された数字は現在の色の範囲に対応して測られているが、RGB値がこの機能によって返される。 colorMode(HSB)によって形を描いている場合でも、返される数字はRGBである。もしリクエストしたピクセルがイメージウィンドウの外にある場合は背景色が返される。widthheight のパラメータで特定してディスプレーウィンドウの一部分を得ることができる。
   
Syntax  
get(x, y)
get(x, y, width, height)
   
Parameters  
x   整数: ピクセルのx-座標

y   整数: ピクセルのy-座標
width   整数: 四角のピクセルの幅

height   整数: 四角のピクセルの高さ


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