FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

add push() and pop() · classicist/processing@2b50c0b · GitHub

Repository navigation

Commit 2b50c0b

Browse files
committed
add push() and pop()
1 parent 8f17ba6 commit 2b50c0b

2 files changed

Lines changed: 17 additions & 22 deletions

File tree

‎core/src/processing/core/PGraphics.java‎

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5126,27 +5126,22 @@ protected void textCharScreenImpl(PImage glyph,
51265126
*/
51275127

51285128

5129-
// /**
5130-
// * Convenience method to get a legit FontMetrics object. Where possible,
5131-
// * override this any renderer subclass so that you're not using what's
5132-
// * returned by getDefaultToolkit() to get your metrics.
5133-
// */
5134-
// @SuppressWarnings("deprecation")
5135-
// public FontMetrics getFontMetrics(Font font) { // ignore
5136-
// Frame frame = parent.frame;
5137-
// if (frame != null) {
5138-
// return frame.getToolkit().getFontMetrics(font);
5139-
// }
5140-
// return Toolkit.getDefaultToolkit().getFontMetrics(font);
5141-
// }
5142-
//
5143-
//
5144-
// /**
5145-
// * Convenience method to jump through some Java2D hoops and get an FRC.
5146-
// */
5147-
// public FontRenderContext getFontRenderContext(Font font) { // ignore
5148-
// return getFontMetrics(font).getFontRenderContext();
5149-
// }
5129+
5130+
//////////////////////////////////////////////////////////////
5131+
5132+
// PARITY WITH P5.JS
5133+
5134+
5135+
public void push() {
5136+
pushStyle();
5137+
pushMatrix();
5138+
}
5139+
5140+
5141+
public void pop() {
5142+
popStyle();
5143+
popMatrix();
5144+
}
51505145

51515146

51525147

‎core/todo.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ X default font will be faster, using ttf/otf is fine
1010
X only createFont("The Font Name") is still slow on macOS
1111
X and PFont.list()
1212
X add circle() and square()
13+
X add push() and pop()
1314

1415
contrib
1516
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)
7778

7879

7980
3.5+
80-
_ add push() and pop()
8181
_ requestSize() and xxxxTitle() (to diminish use of 'surface')
8282
_ make setting the window icon automatic, based on files in local dirs
8383
X https://github.com/processing/processing/issues/5123

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL