mirror of
https://github.com/processing/processing4.git
synced 2026-05-03 17:35:00 +02:00
fixed several polygon bugs from creas and the color[] bugs
This commit is contained in:
@@ -186,7 +186,11 @@ public class KjcEngine extends PdeEngine {
|
||||
if (program.indexOf("color") == 0) program = " " + program;
|
||||
// swap 'color' with 'int' when used as a datatype
|
||||
program = substipoot(program,
|
||||
"([;\\s])color([\\s])", "$1int$2");
|
||||
"([;\\s\\(])color([\\s\\[])", "$1int$2");
|
||||
// had to add ( at beginning for addPixel(color c...)
|
||||
//"([;\\s])color([\\s\\[])", "$1int$2");
|
||||
// had to add [ to that guy for color[] stuff
|
||||
//"([;\\s])color([\\s])", "$1int$2");
|
||||
//"([^A-Za-z0-9_.])color([^A-Za-z0-9_\\(.])", "$1int$2");
|
||||
// color(something) like int() and the rest is no good
|
||||
// because there is already a function called 'color' in BGraphics
|
||||
|
||||
144
bugs.txt
144
bugs.txt
@@ -1,3 +1,146 @@
|
||||
...............................................................
|
||||
|
||||
*** SMOOTHING STRANGE ON SOME EDGES
|
||||
|
||||
....
|
||||
|
||||
|
||||
// here is the same issue, more concise.
|
||||
// one quad is fine, the other has one jagged edge:
|
||||
|
||||
size(200, 200);
|
||||
noStroke();
|
||||
|
||||
fill(102);
|
||||
// bottom line is not smooth
|
||||
quad(0, 0, 100, -20, 120, 100, 0, 120);
|
||||
|
||||
fill(0);
|
||||
// quad draws fine
|
||||
quad(105, 10, 120, 60, 120, 150, 80, 200);
|
||||
|
||||
|
||||
...............................................................
|
||||
|
||||
*** EDGES DON'T HIT ONE ANOTHER CORRECTLY
|
||||
|
||||
....
|
||||
|
||||
// smoothing changes the way sphere is rendered:
|
||||
|
||||
size(200, 200);
|
||||
lights();
|
||||
noStroke();
|
||||
//noSmooth();
|
||||
translate(100, height/2, -50);
|
||||
sphere(100);
|
||||
|
||||
.....
|
||||
|
||||
i'm not sure how to classify, but look at 'typography00'. i think is the
|
||||
same issue as when drawing the cubes above. tangent polygons have
|
||||
lines between them.
|
||||
|
||||
....
|
||||
|
||||
|
||||
// edges in cube rendering have gap when smooth is on:
|
||||
|
||||
void setup()
|
||||
{
|
||||
size(200, 200);
|
||||
lights();
|
||||
noStroke();
|
||||
}
|
||||
|
||||
float angle;
|
||||
void loop()
|
||||
{
|
||||
angle+=0.01;
|
||||
translate(100, 100, 0);
|
||||
rotateX(HALF_PI/2);
|
||||
rotateY(angle);
|
||||
box(80);
|
||||
}
|
||||
|
||||
|
||||
....
|
||||
|
||||
|
||||
ellipses are no longer begin stroked:
|
||||
|
||||
size(200, 200);
|
||||
stroke(255);
|
||||
fill(0);
|
||||
ellipse(50, 50, 100, 100);
|
||||
rect(60, 60, 80, 80);
|
||||
|
||||
|
||||
....
|
||||
|
||||
|
||||
// smoothing around ellipse is inconsistent.
|
||||
// in this example, a foreign circulating line is introduced
|
||||
|
||||
void setup()
|
||||
{
|
||||
size(200, 200);
|
||||
background(102, 0, 0);
|
||||
}
|
||||
|
||||
float a;
|
||||
|
||||
void loop()
|
||||
{
|
||||
a += 0.01;
|
||||
translate(100, 100);
|
||||
rotate(a);
|
||||
ellipse(-50, -50, 100, 200);
|
||||
//ellipse(-50, -50, 100, 100);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
...............................................................
|
||||
|
||||
FIXES
|
||||
|
||||
.....
|
||||
|
||||
in example 'image10', the imported .gif are smoothed. fine, but when,
|
||||
noSmooth() is called in setup, the images no longer display.
|
||||
|
||||
.....
|
||||
|
||||
you put contrain in the superclass and declared it final.
|
||||
examples using contrain function will no longer compile.
|
||||
|
||||
.....
|
||||
|
||||
typography has troubles. look at 'typography03' for the clearest example.
|
||||
|
||||
.....
|
||||
|
||||
learning more about images. they no longer draw if noSmooth() is called.
|
||||
this also applies for fonts.
|
||||
|
||||
size(200, 200);
|
||||
//noSmooth();
|
||||
BImage a; // Declare variable "a" of type BImage
|
||||
a = loadImage("arch.jpg"); // Load the images into the program
|
||||
image(a, 0, 0); // Displays the image from point (0,0)
|
||||
|
||||
.....
|
||||
|
||||
wow! look at 'color01'. that's alot of smoothing goin' on.
|
||||
|
||||
|
||||
|
||||
/ / / / / / / / / / / /
|
||||
|
||||
|
||||
|
||||
4 of the examples stopped compiling (for the same reason) with their port to
|
||||
version 47/48
|
||||
|
||||
@@ -16,6 +159,7 @@ transform05
|
||||
|
||||
/ / / / / / / / / / / /
|
||||
|
||||
|
||||
also that pesky pmouseX, pmouseY seems to be behaving oddly again.
|
||||
it's skipping beats. try this:
|
||||
|
||||
|
||||
19
todo.txt
19
todo.txt
@@ -35,6 +35,16 @@ X change NumberFormat to nf
|
||||
X use System.arraycopy for clear().. could be way fast
|
||||
X test to see how much faster the new arraycopy version is
|
||||
X err, it's slower. that sucks.
|
||||
X fixed bug with typography reported by creas
|
||||
X alpha images were 0xAAAAAAAA b/c of javagl
|
||||
X images were broken with noSmooth
|
||||
|
||||
X 'color[] c' doesn't work, neither does 'color c[] = new color[10]'
|
||||
_ http://proce55ing.net/discourse/yabb/YaBB.cgi?board=Proce55ing_software_bugs;action=display;num=1045052913
|
||||
_ http://proce55ing.net/discourse/yabb/YaBB.cgi?board=Proce55ing_software_bugs;action=display;num=1045675678
|
||||
X several examples broken (note from creas) in bugs.txt
|
||||
_ http://proce55ing.net/discourse/yabb/YaBB.cgi?board=Proce55ing_software_bugs;action=display;num=1042222429
|
||||
X drawing02, input09, input08, transform05, others?
|
||||
|
||||
_ export to .pde file rather than java
|
||||
_ or at least link to that from the web page
|
||||
@@ -67,7 +77,6 @@ _ http://proce55ing.net/discourse/yabb/YaBB.cgi?board=Proce55ing_software_bugs
|
||||
_ fix all the random line types to support alpha
|
||||
_ write code for line joins.. continuous lines should become polygon snake
|
||||
|
||||
|
||||
_ image of 256x256 doesn't draw the last line of pixels
|
||||
_ http://proce55ing.net/discourse/yabb/YaBB.cgi?board=Proce55ing_software_bugs;action=display;num=1045697665;start=0
|
||||
_ weird line in showing in the center of an image
|
||||
@@ -90,11 +99,6 @@ _ environment locks up when error stream isn't for the class
|
||||
_ this happens when it's another thread (i.e. image fetcher)
|
||||
_ exceptions in KjcEngine (formerly 'ex found in run') should be cleaner
|
||||
|
||||
_ several examples broken (note from creas) in bugs.txt
|
||||
_ http://proce55ing.net/discourse/yabb/YaBB.cgi?board=Proce55ing_software_bugs;action=display;num=1042222429
|
||||
_ drawing02, input09, input08, transform05, others?
|
||||
|
||||
|
||||
_ merge bboard groupings (syntax + programs)
|
||||
_ separate bboard and environment
|
||||
|
||||
@@ -357,9 +361,6 @@ PDE / Pre-preprocessor
|
||||
Currently using Oro for search and replace preprocessor.
|
||||
Future plans to use Javacup for preprocessor and Jikes for compiler.
|
||||
|
||||
_ 'color[] c' doesn't work, neither does 'color c[] = new color[10]'
|
||||
_ http://proce55ing.net/discourse/yabb/YaBB.cgi?board=Proce55ing_software_bugs;action=display;num=1045052913
|
||||
_ http://proce55ing.net/discourse/yabb/YaBB.cgi?board=Proce55ing_software_bugs;action=display;num=1045675678
|
||||
_ setup( ){} has an error, setup(){} does not
|
||||
_ http://proce55ing.net/discourse/yabb/YaBB.cgi?board=Proce55ing_software_bugs;action=display;num=1045059758;start=0
|
||||
_ setup (200, 200) causes the default size to be used but setup(200, 200) works fine
|
||||
|
||||
Reference in New Issue
Block a user