首页 > 文档 > width宽度
2017
07-03

width宽度


 

18.width

Name名称):width //宽度

Examples例子):

noStroke();

background(0);

rect(0, 40, width, 20);

rect(0, 60, width/2, 20);

 

Description描述):System variable that stores the width of the display window. This value is set by the first parameter of the size() function. For example, the function call size(320, 240) sets the width variable to the value 320. The value of width defaults to 100 if size() is not used in a program.

存储显示窗口宽度的系统变量。这个值是由size()函数的第一个参数设置的。例如,函数调用size (320,240)将宽度变量设置为320。如果在程序中不使用size(),那么宽度默认值为100。

Related相关函数):height
size()



最后编辑:
作者:卡萨布兰卡
这个作者貌似有点懒,什么都没有留下。

留下一个回复

你的email不会被公开。