mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
removed old cruft
This commit is contained in:
@@ -8935,11 +8935,6 @@ public class PApplet extends Activity implements PConstants, Runnable {
|
||||
}
|
||||
|
||||
|
||||
public void delete() {
|
||||
g.delete();
|
||||
}
|
||||
|
||||
|
||||
public Bitmap getBitmap() {
|
||||
return g.getBitmap();
|
||||
}
|
||||
|
||||
@@ -323,34 +323,8 @@ public class PFont implements PConstants {
|
||||
smooth = is.readBoolean();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void delete() {
|
||||
if (cacheMap != null) {
|
||||
Set<PGraphics> keySet = cacheMap.keySet();
|
||||
if (!keySet.isEmpty()) {
|
||||
Object[] keys = keySet.toArray();
|
||||
for (int i = 0; i < keys.length; i++) {
|
||||
Object data = getCache((PGraphics)keys[i]);
|
||||
Method del = null;
|
||||
|
||||
try {
|
||||
Class<?> c = data.getClass();
|
||||
del = c.getMethod("delete", new Class[] {});
|
||||
} catch (Exception e) {}
|
||||
|
||||
if (del != null) {
|
||||
// The metadata have a delete method. We try running it.
|
||||
try {
|
||||
del.invoke(data, new Object[] {});
|
||||
} catch (Exception e) {}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Write this PFont to an OutputStream.
|
||||
* <p>
|
||||
|
||||
@@ -145,32 +145,6 @@ public class PImage implements PConstants, Cloneable {
|
||||
}
|
||||
|
||||
|
||||
public void delete() {
|
||||
if (cacheMap != null) {
|
||||
Set<PGraphics> keySet = cacheMap.keySet();
|
||||
if (!keySet.isEmpty()) {
|
||||
Object[] keys = keySet.toArray();
|
||||
for (int i = 0; i < keys.length; i++) {
|
||||
Object data = getCache((PGraphics)keys[i]);
|
||||
Method del = null;
|
||||
|
||||
try {
|
||||
Class<?> c = data.getClass();
|
||||
del = c.getMethod("delete", new Class[] {});
|
||||
} catch (Exception e) {}
|
||||
|
||||
if (del != null) {
|
||||
// The metadata have a delete method. We try running it.
|
||||
try {
|
||||
del.invoke(data, new Object[] {});
|
||||
} catch (Exception e) {}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Check the alpha on an image, using a really primitive loop.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user