mirror of
https://github.com/processing/processing4.git
synced 2026-02-14 02:45:36 +01:00
fixes for two nasty line() bugs
This commit is contained in:
@@ -2093,7 +2093,8 @@ public class PGraphics extends PImage implements PConstants {
|
||||
vertexCount++; // since it had already been read above
|
||||
|
||||
v1[X] = v0[X]; v1[Y] = v0[Y]; v1[Z] = v0[Z];
|
||||
v1[SR] = v0[SR]; v1[SG] = v0[SG]; v1[SB] = v0[SB];
|
||||
v1[SR] = v0[SR]; v1[SG] = v0[SG];
|
||||
v1[SB] = v0[SB]; v1[SA] = v0[SA];
|
||||
}
|
||||
|
||||
// increment by two for individual lines
|
||||
|
||||
@@ -270,16 +270,23 @@ public class PLine implements PConstants
|
||||
|
||||
yLonger = false;
|
||||
|
||||
// HACK for drawing lines left-to-right [fry]
|
||||
// HACK for drawing lines left-to-right for rev 0069
|
||||
// some kind of bug exists with the line-stepping algorithm
|
||||
// that causes strange patterns in the anti-aliasing
|
||||
// that causes strange patterns in the anti-aliasing.
|
||||
// [040228 fry]
|
||||
//
|
||||
// swap rgba as well as the coords.. oops
|
||||
// [040712 fry]
|
||||
//
|
||||
if (x_array[1] < x_array[0]) {
|
||||
float t = x_array[1];
|
||||
x_array[1] = x_array[0];
|
||||
x_array[0] = t;
|
||||
t = y_array[1];
|
||||
y_array[1] = y_array[0];
|
||||
y_array[0] = t;
|
||||
float t;
|
||||
|
||||
t = x_array[1]; x_array[1] = x_array[0]; x_array[0] = t;
|
||||
t = y_array[1]; y_array[1] = y_array[0]; y_array[0] = t;
|
||||
t = r_array[1]; r_array[1] = r_array[0]; r_array[0] = t;
|
||||
t = g_array[1]; g_array[1] = g_array[0]; g_array[0] = t;
|
||||
t = b_array[1]; b_array[1] = b_array[0]; b_array[0] = t;
|
||||
t = z_array[1]; z_array[1] = z_array[0]; z_array[0] = t;
|
||||
}
|
||||
|
||||
// important - dont change the casts
|
||||
|
||||
@@ -142,9 +142,9 @@ public class PPolygon implements PConstants {
|
||||
|
||||
// vertexCount-1 is the current vertex that would be used
|
||||
// vertexCount-2 would be the previous feller
|
||||
if ((Math.abs(vertices[vertexCount-2][MX] - x) < 0.0001f) &&
|
||||
(Math.abs(vertices[vertexCount-2][MY] - y) < 0.0001f) &&
|
||||
(Math.abs(vertices[vertexCount-2][MZ] - z) < 0.0001f)) {
|
||||
if ((Math.abs(vertices[vertexCount-2][MX] - x) < EPSILON) &&
|
||||
(Math.abs(vertices[vertexCount-2][MY] - y) < EPSILON) &&
|
||||
(Math.abs(vertices[vertexCount-2][MZ] - z) < EPSILON)) {
|
||||
vertexCount--;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -27,9 +27,13 @@ X bug in BImage.smooth() when resizing an image
|
||||
X http://processing.org/discourse/yabb/YaBB.cgi?board=Proce55ing_software_bugs;action=display;num=1077669847
|
||||
X shut off the automatic gunzipping of streams, keep for fonts
|
||||
X fix for duplicated points in polygons that foiled the tesselator
|
||||
X http://processing.org/discourse/yabb/YaBB.cgi?board=Proce55ing_software_bugs;action=display;num=1077819175
|
||||
X cleaned up texture() code between NEW/OLD graphics
|
||||
X not quite so much duplicated in cases etc.
|
||||
|
||||
X lines: vertex coloring bug with my swap hack
|
||||
X http://processing.org/discourse/yabb/YaBB.cgi?board=Proce55ing_software_bugs;action=display;num=1085348942
|
||||
X last vertex on LINE_LOOP fades out
|
||||
X http://processing.org/discourse/yabb/YaBB.cgi?board=Proce55ing_software_bugs;action=display;num=1076911893
|
||||
|
||||
cleaning up
|
||||
X make bagel more usable as standalone
|
||||
@@ -174,10 +178,6 @@ CORE / PImage
|
||||
CORE / PGraphics
|
||||
|
||||
b _ lines
|
||||
b _ last vertex on LINE_LOOP fades out
|
||||
b _ http://processing.org/discourse/yabb/YaBB.cgi?board=Proce55ing_software_bugs;action=display;num=1076911893
|
||||
b _ vertex coloring bug with carlos' new line code
|
||||
b _ http://processing.org/discourse/yabb/YaBB.cgi?board=Proce55ing_software_bugs;action=display;num=1085348942
|
||||
b X rewrite line and stroke code, it's a buggy mess
|
||||
b X lines become 2 pixels thick after a 3D transform
|
||||
b X better handling of single-pixel special se
|
||||
@@ -200,7 +200,6 @@ CORE / PGraphics
|
||||
b _ setting stroke width on circle makes odd patterns
|
||||
b _ http://processing.org/discourse/yabb/YaBB.cgi?board=Proce55ing_software_bugs;action=display;num=1077013848;start=0
|
||||
b _ http://processing.org/discourse/yabb/YaBB.cgi?board=Proce55ing_software_bugs;action=display;num=1080347160
|
||||
|
||||
b _ more weirdness with stroke on rect, prolly not alpha
|
||||
b _ http://processing.org/discourse/yabb/YaBB.cgi?board=Proce55ing_software_bugs;action=display;num=1085799526
|
||||
b _ rect is not getting it's stroke color set
|
||||
|
||||
Reference in New Issue
Block a user