a little housekeeping

This commit is contained in:
Ben Fry
2015-09-05 08:38:40 -04:00
parent 3e24d1b424
commit fd1b9f9fb0
7 changed files with 49 additions and 34 deletions
+4 -3
View File
@@ -6,9 +6,10 @@ org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annota
org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
@@ -96,7 +97,7 @@ org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
org.eclipse.jdt.core.compiler.source=1.6
org.eclipse.jdt.core.compiler.source=1.7
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=18
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+2 -2
View File
@@ -1893,7 +1893,7 @@ public class PGraphicsJava2D extends PGraphics {
* will get recorded properly.
*/
@Override
protected void setTextSize(float size) {
protected void handleTextSize(float size) {
// if a native version available, derive this font
// if (textFontNative != null) {
// textFontNative = textFontNative.deriveFont(size);
@@ -1927,7 +1927,7 @@ public class PGraphicsJava2D extends PGraphics {
// take care of setting the textSize and textLeading vars
// this has to happen second, because it calls textAscent()
// (which requires the native font metrics to be set)
super.setTextSize(size);
super.handleTextSize(size);
}
+3 -3
View File
@@ -4237,7 +4237,7 @@ public class PGraphics extends PImage implements PConstants {
}
*/
setTextSize(size);
handleTextSize(size);
}
@@ -4361,7 +4361,7 @@ public class PGraphics extends PImage implements PConstants {
* @param size size of the text, greater than zero
*/
protected void textSizeImpl(float size) {
setTextSize(size);
handleTextSize(size);
}
@@ -4370,7 +4370,7 @@ public class PGraphics extends PImage implements PConstants {
* from textFontImpl after setting the font.
* @param size size of the text, greater than zero
*/
protected void setTextSize(float size) {
protected void handleTextSize(float size) {
textSize = size;
textLeading = (textAscent() + textDescent()) * 1.275f;
}
+18 -19
View File
@@ -1333,7 +1333,6 @@ public class PGraphicsFX2D extends PGraphics {
static final class FontInfo {
// TODO: this should be based on memory consumption
// this should be enough e.g. for all grays and alpha combos
static final int MAX_CACHED_COLORS_PER_FONT = 1 << 16;
@@ -1348,7 +1347,6 @@ public class PGraphicsFX2D extends PGraphics {
static final class FontCache {
static final int MAX_CACHE_SIZE = 512;
// keeps track of filenames of fonts loaded from ttf and otf files
@@ -1427,14 +1425,14 @@ public class PGraphicsFX2D extends PGraphics {
}
}
//
// //////////////////////////////////////////////////////////////
//
// // TEXT
//
// // None of the variations of text() are overridden from PGraphics.
//
//
///////////////////////////////////////////////////////////////
// TEXT
// None of the variations of text() are overridden from PGraphics.
//////////////////////////////////////////////////////////////
@@ -1443,24 +1441,25 @@ public class PGraphicsFX2D extends PGraphics {
@Override
protected void textFontImpl(PFont which, float size) {
setTextFont(which, size);
setTextSize(size);
handleTextFont(which, size);
handleTextSize(size);
}
@Override
protected void textSizeImpl(float size) {
setTextFont(textFont, size);
setTextSize(size);
handleTextFont(textFont, size);
handleTextSize(size);
}
/**
* FX specific. When setting font or size, new font has to
* be created. Both textFontImpl and textSizeImpl call this one.
* @param which font to be set, not null
* @param size size to be set, greater than zero
*/
protected void setTextFont(PFont which, float size) {
protected void handleTextFont(PFont which, float size) {
textFont = which;
String fontName = which.getName();
@@ -1562,16 +1561,16 @@ public class PGraphicsFX2D extends PGraphics {
float x2 = x1 + bwidth * textSize;
float y2 = y1 + high * textSize;
PImage glyphImage = fillColor == 0xFFFFFFFF ?
glyph.image :
getTintedGlyphImage(glyph, fillColor);
PImage glyphImage = (fillColor == 0xFFFFFFFF) ?
glyph.image : getTintedGlyphImage(glyph, fillColor);
textCharModelImpl(glyphImage,
x1, y1, x2, y2,
glyph.width, glyph.height);
}
} else if (ch != ' ' && ch != 127) {
showWarning("No glyph found for the " + ch + " (\\u" + PApplet.hex(ch, 4) + ") character");
showWarning("No glyph found for the " + ch +
" (\\u" + PApplet.hex(ch, 4) + ") character");
}
}
@@ -4208,13 +4208,13 @@ public class PGraphicsOpenGL extends PGraphics {
@Override
protected void setTextSize(float size) {
protected void handleTextSize(float size) {
Font font = (Font) textFont.getNative();
if (font != null) {
Object dfont = pgl.getDerivedFont(font, size);
textFont.setNative(dfont);
}
super.setTextSize(size);
super.handleTextSize(size);
}
+16 -5
View File
@@ -2,15 +2,25 @@
X Incomplete text rendering of strings with consecutive line breaks
X https://github.com/processing/processing/issues/3736
X https://github.com/processing/processing/pull/3737
X https://github.com/processing/processing/issues/3761
X add the Contents/Java folder to java.library.path on OS X
X allows exported applications to use the Sound library
_ textFont() and textSize() are each calling one another
_ move createFont() to PGraphics
_ SVG only exports last frame
_ possibly because Java2D is disposing the Graphics2D in between?
_ https://github.com/processing/processing/issues/3753
andres
X P2D: error calling surface.setTitle()
X https://github.com/processing/processing/issues/3721
X https://github.com/processing/processing/commit/a384cbf0890a49dbf6e0fdd80e048de80e5d78d2
X Error message with noLoop() and P2D renderer
X https://github.com/processing/processing/issues/3558
X Concurrency issues in OpenGL renderer prevent proper garbage collection
X https://github.com/processing/processing/issues/3384
X In P2D/P3D the background is cleared to black on each frame
_ https://github.com/processing/processing/issues/3559
jakub
X FX - fix transformation stack NPE
@@ -49,14 +59,15 @@ X Render text starting with space properly
X https://github.com/processing/processing/pull/3746
X FX - smooth for the main surface
X https://github.com/processing/processing/pull/3749
known issues
_ P2D and P3D windows behave strangely when larger than the screen size
_ https://github.com/processing/processing/issues/3401
X OpenGL - clean up loaded and modified for pixels
X https://github.com/processing/processing/pull/3768
X FX - text stuff, move createFont() into PGraphics
X https://github.com/processing/processing/pull/3766
3.0 final
_ P2D and P3D windows behave strangely when larger than the screen size
_ https://github.com/processing/processing/issues/3401
_ move blending calculations from PImage into PGraphics
_ tricky because that means moving blend_resize() as well
_ and should that live in PGraphics or be its own class or ??
+4
View File
@@ -60,6 +60,7 @@ _ mouse events (i.e. toggle breakpoint) seem to be firing twice
3.0 final
_ https://github.com/processing/processing/milestones/3.0%20final
_ change Tool API because it's not one Editor per Tool anymore?
_ or just change the documentation?
_ Contributions Manager UI design
@@ -94,7 +95,10 @@ _ add this to the preferences?
gui
_ don't allow breakpoints to be set on blank lines
_ https://github.com/processing/processing/issues/3765
_ different design of squiggly line?
_ build custom scroll bar since the OS versions are so ugly?
_ Error/warning location visualisation not updating when editor resizes
_ https://github.com/processing/processing/issues/3619
_ error/warning location is awkward when no scroll bar is in use