mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
much improved bagelpublic, minor fix in editor, applet updated for new bagel
This commit is contained in:
@@ -287,11 +287,12 @@ public class PdeEditor extends Panel implements PdeEnvironment {
|
||||
|
||||
lastDirectory = directory;
|
||||
lastFile = filename;
|
||||
message("Done saving file.");
|
||||
message("Done saving " + filename + ".");
|
||||
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
message("Did not write file.");
|
||||
//message("Did not write file.");
|
||||
message("Could not write " + filename + ".");
|
||||
}
|
||||
buttons.clear();
|
||||
}
|
||||
|
||||
@@ -664,24 +664,18 @@ public class ProcessingApplet extends Applet
|
||||
}
|
||||
|
||||
|
||||
public void ellipse(float x, float y, float hradius, float vradius) {
|
||||
g.ellipse(x, y, hradius, vradius);
|
||||
}
|
||||
|
||||
|
||||
public void cube(float size) {
|
||||
g.cube(size);
|
||||
}
|
||||
|
||||
|
||||
public void box(float x1, float y1, float z1,
|
||||
float x2, float y2, float z2) {
|
||||
g.box(x1, y1, z1, x2, y2, z2);
|
||||
}
|
||||
|
||||
|
||||
public void circle(float x, float y, float radius) {
|
||||
g.circle(x, y, radius);
|
||||
}
|
||||
|
||||
|
||||
public void oval(float x, float y, float hradius, float vradius) {
|
||||
g.oval(x, y, hradius, vradius);
|
||||
public void box(float w, float h, float d) {
|
||||
g.box(w, h, d);
|
||||
}
|
||||
|
||||
|
||||
@@ -695,6 +689,11 @@ public class ProcessingApplet extends Applet
|
||||
}
|
||||
|
||||
|
||||
public Image loadImage(String filename) {
|
||||
return g.loadImage(filename);
|
||||
}
|
||||
|
||||
|
||||
public void image(BagelImage image, float x1, float y1) {
|
||||
g.image(image, x1, y1);
|
||||
}
|
||||
@@ -713,23 +712,23 @@ public class ProcessingApplet extends Applet
|
||||
}
|
||||
|
||||
|
||||
public void loadFont(String s) {
|
||||
g.loadFont(s);
|
||||
public int loadFont(String name) {
|
||||
return g.loadFont(name);
|
||||
}
|
||||
|
||||
|
||||
public void setFont(String s) {
|
||||
g.setFont(s);
|
||||
public void setFont(int which) {
|
||||
g.setFont(which);
|
||||
}
|
||||
|
||||
|
||||
public void text(char c) {
|
||||
g.text(c);
|
||||
public void text(char c, float x, float y) {
|
||||
g.text(c, x, y);
|
||||
}
|
||||
|
||||
|
||||
public void text(String s) {
|
||||
g.text(s);
|
||||
public void text(String s, float x, float y) {
|
||||
g.text(s, x, y);
|
||||
}
|
||||
|
||||
|
||||
@@ -938,4 +937,9 @@ public class ProcessingApplet extends Applet
|
||||
public void message(int level, String message, Exception e) {
|
||||
g.message(level, message, e);
|
||||
}
|
||||
|
||||
|
||||
public InputStream getStream(String filename) throws IOException {
|
||||
return g.getStream(filename);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,9 +34,14 @@ while ($line = shift(@contents)) {
|
||||
}
|
||||
next if ($comments > 0);
|
||||
|
||||
if ($line =~ /^\s*(public \w+ [a-zA-z_]+\(.*$)/) {
|
||||
if ($line =~ /^\s*public (\w+) [a-zA-z_]+\(.*$/) {
|
||||
#print "$1\n";
|
||||
#$decl .= $line;
|
||||
if ($1 ne 'void') {
|
||||
$returns = 'return';
|
||||
} else {
|
||||
$returns = '';
|
||||
}
|
||||
print "\n\n$line";
|
||||
$decl .= $line;
|
||||
while (!($line =~ /\)/)) {
|
||||
@@ -49,7 +54,7 @@ while ($line = shift(@contents)) {
|
||||
$decl =~ /\s(\S+)\(/;
|
||||
$decl_name = $1;
|
||||
#print "dec $decl_name\n";
|
||||
print " g.${decl_name}(";
|
||||
print " $returns g.${decl_name}(";
|
||||
|
||||
$decl =~ s/\s+/ /g; # smush onto a single line
|
||||
$decl =~ s/^.*\(//;
|
||||
|
||||
Reference in New Issue
Block a user