From 243e68d3f4900188f9110eae8f23a7e25b09f4b2 Mon Sep 17 00:00:00 2001 From: benfry Date: Wed, 16 Jul 2008 19:03:53 +0000 Subject: [PATCH] clarifications in resize() method doc --- core/src/processing/core/PGraphics.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/core/src/processing/core/PGraphics.java b/core/src/processing/core/PGraphics.java index 07ee33ba6..9aa1f60aa 100644 --- a/core/src/processing/core/PGraphics.java +++ b/core/src/processing/core/PGraphics.java @@ -662,7 +662,12 @@ public abstract class PGraphics extends PImage implements PConstants { * Called in repsonse to a resize event, handles setting the * new width and height internally, as well as re-allocating * the pixel buffer for the new size. - *

+ * + * Unlike the inherited version of this function from PImage, calling + * resize() on a PGraphics will clear its contents. To resize an image + * taken from a PGraphics object, first all get(), and resize() that + * copy of the image. + * * Note that this will nuke any camera settings. */ public void resize(int iwidth, int iheight) { // ignore @@ -2321,7 +2326,7 @@ public abstract class PGraphics extends PImage implements PConstants { // The following is what needs to be done, however we need to be able // to get the actual graphics context where the drawing is happening. // For instance, parent.getGraphics() doesn't work for OpenGL since - // an OpenGL drawing surface is an embedded component. + // an OpenGL drawing surface is an embedded component. // if (parent != null) { // textFontNativeMetrics = parent.getGraphics().getFontMetrics(textFontNative); // }