add push() and pop()

This commit is contained in:
Ben Fry
2019-01-18 15:17:51 -08:00
parent ed165727a3
commit eb60ee2d05
2 changed files with 17 additions and 22 deletions
+16 -21
View File
@@ -5126,27 +5126,22 @@ public class PGraphics extends PImage implements PConstants {
*/
// /**
// * Convenience method to get a legit FontMetrics object. Where possible,
// * override this any renderer subclass so that you're not using what's
// * returned by getDefaultToolkit() to get your metrics.
// */
// @SuppressWarnings("deprecation")
// public FontMetrics getFontMetrics(Font font) { // ignore
// Frame frame = parent.frame;
// if (frame != null) {
// return frame.getToolkit().getFontMetrics(font);
// }
// return Toolkit.getDefaultToolkit().getFontMetrics(font);
// }
//
//
// /**
// * Convenience method to jump through some Java2D hoops and get an FRC.
// */
// public FontRenderContext getFontRenderContext(Font font) { // ignore
// return getFontMetrics(font).getFontRenderContext();
// }
//////////////////////////////////////////////////////////////
// PARITY WITH P5.JS
public void push() {
pushStyle();
pushMatrix();
}
public void pop() {
popStyle();
popMatrix();
}
+1 -1
View File
@@ -10,6 +10,7 @@ X default font will be faster, using ttf/otf is fine
X only createFont("The Font Name") is still slow on macOS
X and PFont.list()
X add circle() and square()
X add push() and pop()
contrib
o make tabs into spaces, fixes pixelDensity(2) issue with tabs
@@ -77,7 +78,6 @@ _ (Map is more efficient b/c of size, Iterable more useful)
3.5+
_ add push() and pop()
_ requestSize() and xxxxTitle() (to diminish use of 'surface')
_ make setting the window icon automatic, based on files in local dirs
X https://github.com/processing/processing/issues/5123