loaddisplayshape.pde

来自「This is processing for java examples.」· PDE 代码 · 共 27 行

PDE
27
字号
/** * Load and Display a Shape.  * Illustration by George Brower.  *  * The loadShape() command is used to read simple SVG (Scalable Vector Graphics) * files into a Processing sketch. This library was specifically tested under * SVG files created from Adobe Illustrator. For now, we can't guarantee that  * it'll work for SVGs created with anything else.  */PShape bot;void setup() {  size(640, 360);  smooth();  // The file "bot1.svg" must be in the data folder  // of the current sketch to load successfully  bot = loadShape("bot1.svg");  noLoop(); // Only run draw() once} void draw(){  background(102);  shape(bot, 110, 90, 100, 100);  // Draw at coordinate (10, 10) at size 100 x 100  shape(bot, 280, 40);            // Draw at coordinate (70, 60) at the default size}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?