textLeading()

本参考资料用于Processing 3.0+。 如果你使用的是前一版本,请在使用软件帮助菜单内的参考资料。. If you see any errors or have suggestions, please let us know. If you prefer a more technical reference, visit the Processing Core Javadoc and Libraries Javadoc.

名称

textLeading()

示例
 // Text to display. The "\

n" is a "new line" character String lines = "L1\

nL2\

nL3";

textSize(12);


fill(0);

// Set fill to black  textLeading(10);

// Set leading to 10 text(lines, 10, 25);

textLeading(20);

// Set leading to 20 text(lines, 40, 25);

textLeading(30);

// Set leading to 30 text(lines, 70, 25);

描述 Sets the spacing between lines of text in units of pixels. This setting will be used in all subsequent calls to the text() function. Note, however, that the leading is reset by textSize(). For example, if the leading is set to 20 with textLeading(20), then if textSize(48) is run at a later point, the leading will be reset to the default for the text size of 48.
语法
textLeading(leading)
参数
leading float: the size in pixels for spacing between lines
返回值 void
相关 loadFont()
text()
textFont()
textSize()

Updated on October 2, 2018 05:02:09pm EDT

textLeading()