mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
add push() and pop()
This commit is contained in:
@@ -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
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user