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


Name

text()

Examples
example pic
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);
example pic
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);
example pic
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
data String, char, int, or float: the alphanumeric symbols to be displayed
x int or float: x-coordinate of text
y int or float: y-coordinate of text
z int or float: z-coordinate of text
stringdata String: letters to be displayed
width int or float: width of text box
height int or float: height of text box
Usage Web & Application
Related textAlign()
textMode()
loadFont()
PFont
textFont()
Updated on July 17, 2007 09:03:28am PDT

Creative Commons License

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

© 2007 Processing.org