这在处理中有效,它是2.2版本的IDE。将其移到Eclipse中,绘图部分就可以工作了
import processing.core.*;
import processing.dxf.*;
public class ShowCameraParts extends PApplet {
/**
*
*/
private static final long serialVersionUID = 1L;
boolean record = false;
QuadWith2EarsAttached[] tp = new QuadWith2EarsAttached[1];
public void setup() {
size(Settings.WINDOW_X, Settings.WINDOW_Y);
// lights(); lights() is not available with this renderer.
background(200);
noFill();
stroke(0);
tp[0] = new QuadWith2EarsAttached(this);
}
public void draw() {
if (record == true) {
beginRaw(DXF,"CameraPart.dxf"); // Start recording to the file
}
tp[0].draw();
if (record == true) {
endRaw();
record = false; // Stop recording to the file
}
}
public void keyPressed() {
if (key == 'R' || key == 'r') { // Press R to save the file
record = true;
println("DXF Done");
}
}
}但是当我在Eclipse中运行它时,当按下"r“时,我会得到这个错误
DXF Done
beginRaw() is not available with this renderer.
endRaw() is not available with this renderer.从处理中创建的图形创建dxf的正确方法是什么?
发布于 2015-03-12 13:25:01
奇怪的是,因为我没有发表评论
import processing.dxf.*;只是起作用了。不知道为什么,但它确实起作用了
https://stackoverflow.com/questions/28785901
复制相似问题