fixing lots of small bugs

This commit is contained in:
benfry
2006-09-13 02:41:24 +00:00
parent e6c05cecf4
commit 50c869176b
5 changed files with 82 additions and 70 deletions
+4
View File
@@ -2036,6 +2036,10 @@ public class PApplet extends Applet
//Runtime.getRuntime().exec("cmd /c " + currentDir + "\\reference\\" +
// referenceFile + ".html");
// replace ampersands with control sequence for DOS.
// solution contributed by toxi on the bugs board.
url = url.replaceAll("&","^&");
// open dos prompt, give it 'start' command, which will
// open the url properly. start by itself won't work since
// it appears to need cmd
+1 -1
View File
@@ -731,7 +731,7 @@ public class PFont implements PConstants {
//PApplet.printarr(renderingHintsClass.getFields());
Field antialiasingKeyField =
renderingHintsClass.getDeclaredField("KEY_TEXT_ANTIALIASING");
renderingHintsClass.getField("KEY_TEXT_ANTIALIASING");
Object antialiasingKey =
antialiasingKeyField.get(renderingHintsClass);
+27 -28
View File
@@ -115,7 +115,7 @@ public class PGraphicsJava2D extends PGraphics {
// FRAME
public void beginDraw() {
// need to call defaults(), but can only be done when it's ok
// to draw (i.e. for opengl, no drawing can be done outside
@@ -128,11 +128,11 @@ public class PGraphicsJava2D extends PGraphics {
vertexCount = 0;
}
public void endDraw() {
// hm, mark pixels as changed, because this will instantly do a full
// hm, mark pixels as changed, because this will instantly do a full
// copy of all the pixels to the surface.. so that's kind of a mess.
//endPixels();
//endPixels();
}
@@ -155,18 +155,18 @@ public class PGraphicsJava2D extends PGraphics {
// then just use it to continue the shape.
gpath = null;
}
public void textureMode(int mode) {
unavailableError("textureMode(mode)");
}
public void texture(PImage image) {
unavailableError("texture(image)");
}
public void vertex(float x, float y) {
splineVertexCount = 0;
//float vertex[];
@@ -282,18 +282,18 @@ public class PGraphicsJava2D extends PGraphics {
break;
}
}
public void vertex(float x, float y, float u, float v) {
unavailableError("vertex(x, y, u, v");
}
public void vertex(float x, float y, float z) {
depthErrorXYZ("vertex");
}
public void vertex(float x, float y, float z, float u, float v) {
depthErrorXYZ("vertex");
}
@@ -769,15 +769,19 @@ public class PGraphicsJava2D extends PGraphics {
return;
}
// check to see if this font wants to be smoothed but smoothing
// is currently shut off for the graphics context overall
boolean savedSmooth = smooth;
if (textFont.smooth != savedSmooth) {
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
textFont.smooth ?
RenderingHints.VALUE_ANTIALIAS_ON :
RenderingHints.VALUE_ANTIALIAS_OFF);
}
// save the current setting for text smoothing. note that this is
// different from the smooth() function, because the font smoothing
// is controlled when the font is created, not now as it's drawn.
// fixed a bug in 0116 that handled this incorrectly.
Object textAntialias =
g2.getRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING);
// override the current text smoothing setting based on the font
// (don't change the global smoothing settings)
g2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,
textFont.smooth ?
RenderingHints.VALUE_ANTIALIAS_ON :
RenderingHints.VALUE_ANTIALIAS_OFF);
g2.setColor(fillColorObject);
// better to use drawString(float, float)?
@@ -790,13 +794,8 @@ public class PGraphicsJava2D extends PGraphics {
//g2.drawGlyphVector(gv, x, y);
// return to previous smoothing state if it was changed
if (textFont.smooth != savedSmooth) {
if (savedSmooth) {
smooth();
} else {
noSmooth();
}
}
g2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, textAntialias);
textX = x + textWidthImpl(buffer, start, stop);
textY = y;
textZ = 0; // this will get set by the caller if non-zero
+35 -38
View File
@@ -48,6 +48,15 @@ X check http:// stuff to see if it's a url first on openStream()
X it's the most harmless, since prolly just a MFUEx
X fix problem where root of exported sketch won't be checked
X http://dev.processing.org/bugs/show_bug.cgi?id=389
X createFont not working from applets (only with .ttf?)
X throws a security exception because of the reflection stuff
X http://dev.processing.org/bugs/show_bug.cgi?id=101
X urls with ampersands don't work with link()
X Runtime.getRuntime().exec("cmd /c start " + url.replaceAll("&","^&"));
X http://processing.org/discourse/yabb_beta/YaBB.cgi?board=SoftwareBugs;action=display;num=1149974261
X fix bug where smooth() was shut off after using text
X (that had the smoothing turned off when used in "Create Font")
X http://processing.org/discourse/yabb_beta/YaBB.cgi?board=SoftwareBugs;action=display;num=1148362664
more recent
X only update mouse pos on moved and dragged
@@ -67,20 +76,14 @@ o right now the camera doesn't get set up unless you call depth()
o box and sphere are broken in gl
o what should the update image function be called?
_ use parseFloat instead of toFloat()? to be consistent with javascript
_ should reader() be openReader() for consistency?
_ though printwriter is odd for output..
_ outofmemoryerror for casey's students
_ http://dev.processing.org/bugs/show_bug.cgi?id=355
_ this may be related to a ton of other memory bugs
needs to be tested
_ threading or new jogl may fix blank screen issues on linux:
_ applet.setupFrameResizeListener() hack fixes things though
_ jogl issues with some cards on linux, might be fixed with newer jogl
_ http://dev.processing.org/bugs/show_bug.cgi?id=367
still not fixed
_ add begin/end/alloc waits to PGraphicsJava2D, PGraphicsOpenGL, and PGraphics3D
_ set default frameRate cap at 60
_ otherwise really thrashing the cpu when not necessary
_ things not showing up in linux
_ probably threading issue, 98 doesn't have any trouble
_ signs point to Runner or PApplet changes between 98 and 99
@@ -88,20 +91,32 @@ _ commenting out applet.setupFrameResizeListener()
_ in line 307 from Runner.java solved the problem
_ http://dev.processing.org/bugs/show_bug.cgi?id=282
_ image outofmemoryerror for casey's students
_ http://dev.processing.org/bugs/show_bug.cgi?id=355
_ this may be related to a ton of other memory bugs
_ for a PGraphics2D, should its image cache object be the memoryimagesource?
_ is the texture[] array in PGraphics3D causing the problems with memory?
_ actually it's a PGraphicsGL problem..
_ maybe the image binding not getting unbound?
_ jpeg loading may be extremely slow (loadBytes?)
_ seems specific to 0115 versus the others
_ http://processing.org/discourse/yabb_beta/YaBB.cgi?board=SoftwareBugs;action=display;num=1158111639
_ http://processing.org/discourse/yabb_beta/YaBB.cgi?board=SoftwareBugs;action=display;num=1154714548
api issues
_ remove LINE_LOOP and LINE_STRIP
_ also remove POLYGON? still would be good to have an internal constant
_ use parseFloat instead of toFloat()? to be consistent with javascript
_ should reader() be openReader() for consistency?
_ though printwriter is odd for output..
_ when running as an applet, sketchPath won't be set
_ http://processing.org/discourse/yabb_beta/YaBB.cgi?board=Syntax;action=display;num=1153150923
_ remove LINE_LOOP and LINE_STRIP
_ also remove POLYGON? still would be good to have an internal constant
_ was grabbing the wrong native font with ico sketch
_ seems that the psname is no longer a good way to grab the font? related?
_ add begin/end/alloc waits to PGraphicsJava2D, PGraphicsOpenGL, and PGraphics3D
_ set default frameRate cap at 60
_ otherwise really thrashing the cpu when not necessary
_ color(0, 0, 0, 0) produces black
_ although fill(0, 0, 0, 0) does the right thing
_ also, rgb255 not getting set
@@ -113,14 +128,8 @@ _ otherwise the end will look like it's time to update
_ which may not actually be the case
_ i.e. calling filter() inside begin/end block
things before 1.0
_ know internal vs. external lines, so that anti-aliasing can be shut off for internal
_ is the texture[] array in PGraphics3D causing the problems with memory?
_ actually it's a PGraphicsGL problem.. maybe the image binding not getting unbound?
_ for a PGraphics2D, should its image cache object be the memoryimagesource?
_ keep track of internal lines in shapes
_ disable anti-aliasing for internal edges
_ only call defaults() when it's part of a PApplet canvas
_ make sure that defaults() is no longer necessary
@@ -136,11 +145,9 @@ _ copy() sort of broken in JAVA2D
_ example sketch posted with bug report
_ http://dev.processing.org/bugs/show_bug.cgi?id=372
reasons to drop 1.1 support (and support 1.3+)
_ remove reflection from createFont() constructor/methods in PFont
_ this would make PFont much smaller
_ would also get rid of security exception
_ array functions could be done through Arrays.xxx class
_ although some of these may be built in
_ sorting could be done through built-in sort() class
@@ -156,9 +163,6 @@ _ fix the internal file chooser so that people don't need to make their own
_ threading is a problem with inputFile() and inputFolder()
_ dynamically load swingworker?
_ jpeg loading may be extremely slow (loadBytes?)
_ http://processing.org/discourse/yabb_beta/YaBB.cgi?board=Contribution_Responsive;action=display;num=1150064360
_ svg loader is on the list for 1.0
_ maybe include as part of PApplet (casey thinks so)
_ svg output, make simple version of PGraphicsSVG based on PGraphicsPDF
@@ -180,10 +184,6 @@ line(0, width, height, 0);
saveFrame();
}
_ urls with ampersands don't work with link()
_ Runtime.getRuntime().exec("cmd /c start " + url.replaceAll("&","^&"));
_ http://processing.org/discourse/yabb_beta/YaBB.cgi?board=SoftwareBugs;action=display;num=1149974261
_ fonts in java 1.5 have changed again
_ appears that asking for the postscript name no longer works
_ fix "create font" and associated font stuff to straighten it out
@@ -622,9 +622,6 @@ _ when did this break? 1.4.1? 1.4.x vs 1.3?
_ may be that cff fonts won't work?
_ or is it only those with ps names?
_ http://processing.org/discourse/yabb_beta/YaBB.cgi?board=SoftwareBugs;action=display;num=1117445969
_ createFont not working from applets (only with .ttf?)
_ throws a security exception because of the reflection stuff
_ http://dev.processing.org/bugs/show_bug.cgi?id=101
_ text() with a z coordinate is now using translate, very slow
X also puts up a weird error message about translate() in 2D mode
_ make screen space fonts use get/set as well?
+15 -3
View File
@@ -11,6 +11,11 @@ o is there a way to set the color of the Frame growbox?
o currently it's white instead of dark gray like the ui
o setBackground(Color) didn't seem to help inside PdeBase.<init>
X moot point because grow boxes removed in later os releases
X ignore sketches that have ._blah.java or ._blah.pde files
X this could cause crashes on macosx
X be more strict about opening sketches with illegal characters
X in previous releases, it was possible to rename sketches outside p5
X to something that was illegal. now those files are ignored
faq additions
X add notes about sketchPath() and savePath() to library docs
@@ -503,6 +508,7 @@ _ http://processing.org/bugs/show_bug.cgi?id=36
_ undo after "import library" makes a blank screen
_ http://processing.org/bugs/show_bug.cgi?id=41
_ fonts smaller than 10 cause problems in the editor on osx
_ on windows and linux, changing the size throws things off
_ http://processing.org/bugs/show_bug.cgi?id=51
_ code coloring is imperfect because it's not based on a parser
_ i.e. mousePressed() is red but mouseMoved() is brown
@@ -645,9 +651,12 @@ _ that way if it's enabled, will always run externally
PDE / Runner
_ antlr.jar in the classpath will cause trouble..
_ jogl jar files, or jogl install will cause trouble
_ /System/Library/Extensions or /Library/Extensions
_ need to deal with classpath conflicts
_ avoid garbage that people have installed on their machines
_ antlr.jar in the classpath will cause trouble..
_ http://processing.org/discourse/yabb_beta/YaBB.cgi?board=SoftwareBugs;action=display;num=1138652326
_ jogl jar files, or jogl install will cause trouble
_ /System/Library/Extensions or /Library/Extensions
_ when a conflicting library is found, need to report it
_ altho prolly only when it's actually different (md5hash it?)
_ this seems to be causing a lot of trouble with recent releases
@@ -833,6 +842,9 @@ _ hex colors don't get formatted
_ http://dev.processing.org/bugs/show_bug.cgi?id=303
_ another code example that crashes
_ http://dev.processing.org/bugs/show_bug.cgi?id=363
_ japanese characters in comments cause trouble with auto-format
_ http://processing.org/discourse/yabb_beta/YaBB.cgi?board=SoftwareBugs;action=display;num=1153505384
TOOLS / Create Font