Name |
shape()形状 |
||||||||||||||||
Examples |
PShape s;
void setup() { s = loadShape(“bot.svg”); }
void draw() { shape(s, 10, 10, 80, 80); } |
||||||||||||||||
Description |
Draws shapes to the display window. Shapes must be in the sketch’s “data” directory to load correctly. Select “Add file…” from the “Sketch” menu to add the shape. Processing currently works with SVG, OBJ, and custom-created shapes. The shape parameter specifies the shape to display and the coordinate parameters define the location of the shape from its upper-left corner. The shape is displayed at its original size unless the c and d parameters specify a different size. The shapeMode() function can be used to change the way these parameters are interpreted. 将形状绘制到显示窗口。形状必须在草绘的 “数据” 目录中才能正确加载。从 “草绘” 菜单中选择 “添加文件…” 来添加形状。当前处理的工作是使用 svg、obj 和自定义创建的形状。形状参数指定要显示的形状, 并且坐标参数从其左上角定义形状的位置。除非 c 和 d 参数指定不同的大小, 否则该形状将以原始大小显示。shapeMode () 函数可用于更改这些参数的解释方式。 |
||||||||||||||||
Syntax |
shape(shape) shape(shape, x, y) shape(shape, a, b, c, d) |
||||||||||||||||
Parameters |
|
||||||||||||||||
Returns |
void |
||||||||||||||||
Related |
PShape |
- 本文固定链接: http://iprocessing.cn/2017/08/01/shape形状/
- 转载请注明: 卡萨布兰卡 于 Processing编程艺术 发表