Processing (BETA) version 135+ のリファレンスです。 旧バージョン使用者はソフトウェア内のリファレンスを参照してください。
この文書は Processing のAPIリファレンスを日本語に訳したものです。 最新の内容は 英語版 で確認して下さい。


Name

background()

Examples
example pic
background(51);
example pic
background(255, 204, 0);
example pic
PImage b;
b = loadImage("laDefense.jpg");
background(b);
Description background() は Plocessing ウィンドウに背景色を設定します。 デフォルトカラーはライトグレー(light gray)です。 draw() 内で使用するとフレーム間でディスプレイウィンドウをリフレッシュすることができます。 ディスプレイウィンドウと同じサイズの JPG や GIF イメージを読み込んで背景として使用することもできます。 イメージは適切に読み込めるように sketch の "data" ディレクトリに格納しなければなりません。
Syntax
background(value1)
background(value1, value2, value3)
background(image)
Parameters
value1 int or float: red or hue value (depending on the current color mode)
value2 int or float: green or saturation value (depending on the current color mode)
value3 int or float: blue or brightness value (depending on the current color mode)
image PImage: the name of a PImage the same size as the display window
Usage Web & Application
Related colorMode()
Updated on September 23, 2006 05:40:16pm PDT

Creative Commons License

この文書の原文はクリエイティブ・コモンズ(Creative Commons)Attribution-Noncommercial-Share Alike(表示・非営利・継承) ライセンスで公開されています。 このライセンスは同一の許諾条件の下で原作者のクレジットを表示し、また作品を営利目的で利用しなければ、作品に対して複製、頒布、展示、実演、二次的著作物の作成が行えることを示します。

© 2007 Processing.org