removing goofy constructor from PImage

This commit is contained in:
benfry
2006-09-22 12:30:06 +00:00
parent a6e009d006
commit f77d07a05c
3 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -2368,7 +2368,7 @@ public class PApplet extends Applet
if (!cursor_visible) return; // don't hide if already hidden.
if (invisible_cursor == null) {
invisible_cursor = new PImage(new int[16*16], 16, 16, ARGB);
invisible_cursor = new PImage(16, 16, ARGB);
}
// was formerly 16x16, but the 0x0 was added by jdf as a fix
// for macosx, which didn't wasn't honoring the invisible cursor
+3 -5
View File
@@ -198,8 +198,7 @@ public class PFont implements PConstants {
images = new PImage[charCount];
for (int i = 0; i < charCount; i++) {
int pixels[] = new int[twidth * theight];
images[i] = new PImage(pixels, twidth, theight, ALPHA);
images[i] = new PImage(twidth, theight, ALPHA);
int bitmapSize = height[i] * width[i];
byte temp[] = new byte[bitmapSize];
@@ -889,8 +888,7 @@ public class PFont implements PConstants {
if (width[index] > maxWidthHeight) maxWidthHeight = width[index];
if (height[index] > maxWidthHeight) maxWidthHeight = height[index];
bitmaps[index] = new PImage(new int[width[index] * height[index]],
width[index], height[index], ALPHA);
bitmaps[index] = new PImage(width[index], height[index], ALPHA);
for (int y = minY; y <= maxY; y++) {
for (int x = minX; x <= maxX; x++) {
@@ -929,7 +927,7 @@ public class PFont implements PConstants {
// so that this font can be used immediately by p5.
images = new PImage[charCount];
for (int i = 0; i < charCount; i++) {
images[i] = new PImage(new int[mbox2*mbox2], mbox2, mbox2, ALPHA);
images[i] = new PImage(mbox2, mbox2, ALPHA);
for (int y = 0; y < height[i]; y++) {
System.arraycopy(bitmaps[i].pixels, y*width[i],
images[i].pixels, y*mbox2,
+3 -1
View File
@@ -124,6 +124,7 @@ public class PImage implements PConstants, Cloneable {
}
/*
public PImage(int pixels[], int width, int height, int format) {
this.pixels = pixels;
this.width = width;
@@ -131,6 +132,7 @@ public class PImage implements PConstants, Cloneable {
this.format = format;
this.cache = null;
}
*/
/**
@@ -446,7 +448,7 @@ public class PImage implements PConstants, Cloneable {
if (x + w > width) w = width - x;
if (y + h > height) h = height - y;
PImage newbie = new PImage(new int[w*h], w, h, format);
PImage newbie = new PImage(w, h, format);
int index = y*width + x;
int index2 = 0;