Processing (BETA) version 135+ のリファレンスです。
旧バージョン使用者はソフトウェア内のリファレンスを参照してください。
この文書は Processing のAPIリファレンスを日本語に訳したものです。
最新の内容は 英語版 で確認して下さい。
| Name | text() |
||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Examples | ![]() PFont font;
// The font must be located in the sketch's
// "data" directory to load successfully
font = loadFont("FFScala-32.vlw");
textFont(font);
text("word", 15, 30);
fill(0, 102, 153);
text("word", 15, 60);
fill(0, 102, 153, 51);
text("word", 15, 90);![]() size(100, 100, P3D);
PFont font;
font = loadFont("FFScala-32.vlw");
textFont(font);
text("word", 15, 60, -30);
fill(0, 102, 153);
text("word", 15, 60);![]() PFont font;
font = loadFont("FFScala-Bold-12.vlw");
textFont(font);
String s = "The quick brown fox jumped over the lazy dog.";
text(s, 15, 20, 70, 70); |
||||||||||||||
| Description | テキストをスクリーンに描画します。 x, y パラメタ、及び任意の z パラメタで指定したスクリーン上の位置に、 data または stringdata パラメタで指定した情報を表示します。 フォントは text() が呼ばれる前に textFont() で指定しなければなりません。 width, height パラメタは文字列を表示するための長方形のエリアを定義します。 textAlign() と組み合わせて使用することでテキストの描画位置を指定できます。 textMode() に SCREEN パラメタを指定することでテキストを2次元で表示できます。 fill() でテキストの色を変更できます。 | ||||||||||||||
| Syntax | text(data, x, y) text(data, x, y, z) text(stringdata, x, y, width, height) text(stringdata, x, y, width, height, z) |
||||||||||||||
| Parameters |
|
||||||||||||||
| Usage | Web & Application | ||||||||||||||
| Related | textAlign() textMode() loadFont() PFont textFont() |
この文書の原文はクリエイティブ・コモンズ(Creative Commons)のAttribution-Noncommercial-Share Alike(表示・非営利・継承) ライセンスで公開されています。
このライセンスは同一の許諾条件の下で原作者のクレジットを表示し、また作品を営利目的で利用しなければ、作品に対して複製、頒布、展示、実演、二次的著作物の作成が行えることを示します。
© 2007 Processing.org
© 2007 Processing.org




