diff --git a/core/src/processing/core/PGraphics.java b/core/src/processing/core/PGraphics.java index de5098296..c05d34c38 100644 --- a/core/src/processing/core/PGraphics.java +++ b/core/src/processing/core/PGraphics.java @@ -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(); + } diff --git a/core/todo.txt b/core/todo.txt index 83eb6a583..94abc2fe8 100644 --- a/core/todo.txt +++ b/core/todo.txt @@ -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