mirror of
https://github.com/processing/processing4.git
synced 2026-02-11 09:39:19 +01:00
fix for backwards rects and ellipses
This commit is contained in:
@@ -824,6 +824,14 @@ public class PGraphics extends PImage implements PConstants {
|
||||
y1 -= vradius;
|
||||
}
|
||||
|
||||
if (x1 > x2) {
|
||||
float temp = x1; x1 = x2; x2 = temp;
|
||||
}
|
||||
|
||||
if (y1 > y2) {
|
||||
float temp = y1; y1 = y2; y2 = temp;
|
||||
}
|
||||
|
||||
rectImpl(x1, y1, x2, y2);
|
||||
}
|
||||
|
||||
@@ -865,6 +873,16 @@ public class PGraphics extends PImage implements PConstants {
|
||||
y = b - d/2f;
|
||||
}
|
||||
|
||||
if (w < 0) { // undo negative width
|
||||
x += w;
|
||||
w = -w;
|
||||
}
|
||||
|
||||
if (h < 0) { // undo negative height
|
||||
y += h;
|
||||
h = -h;
|
||||
}
|
||||
|
||||
ellipseImpl(x, y, w, h);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
0078 core
|
||||
X text lines were getting horizontally mashed together
|
||||
X text lines also getting vertically smashed together
|
||||
X make a note of the change to font.width()
|
||||
X text fixes
|
||||
X lines were getting horizontally mashed together
|
||||
X lines also getting vertically smashed together
|
||||
X make a note of the change to font.width()
|
||||
X backwards rects and backwards ellipses weren't properly drawn
|
||||
X code now compensates for negative widths or swapped x1/x2
|
||||
|
||||
_ get SCREEN_SPACE text working again
|
||||
|
||||
_ backwards rects may not be getting drawn in PGraphics2
|
||||
|
||||
_ updatePixels() not setting PApplet.pixels
|
||||
_ also throwing NPEs
|
||||
|
||||
Reference in New Issue
Block a user