From 2022932e85f37bf1f1be58683ab861ed1b1b8aa0 Mon Sep 17 00:00:00 2001 From: benfry Date: Sun, 25 Jul 2004 19:28:58 +0000 Subject: [PATCH] little bits --- processing/core/PApplet.java | 15 ++++++++++----- processing/core/PFont.java | 9 --------- processing/core/todo.txt | 4 ++++ 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/processing/core/PApplet.java b/processing/core/PApplet.java index 3116815bf..27564f268 100644 --- a/processing/core/PApplet.java +++ b/processing/core/PApplet.java @@ -2201,29 +2201,34 @@ public class PApplet extends Applet // - static public void append(byte b[], byte value) { + static public byte[] append(byte b[], byte value) { b = expand(b, b.length + 1); b[b.length-1] = value; + return b; } - static public void append(char b[], char value) { + static public char[] append(char b[], char value) { b = expand(b, b.length + 1); b[b.length-1] = value; + return b; } - static public void append(int b[], int value) { + static public int[] append(int b[], int value) { b = expand(b, b.length + 1); b[b.length-1] = value; + return b; } - static public void append(float b[], float value) { + static public float[] append(float b[], float value) { b = expand(b, b.length + 1); b[b.length-1] = value; + return b; } - static public void append(String b[], String value) { + static public String[] append(String b[], String value) { b = expand(b, b.length + 1); b[b.length-1] = value; + return b; } // diff --git a/processing/core/PFont.java b/processing/core/PFont.java index 1350d8bac..5c68d9a27 100644 --- a/processing/core/PFont.java +++ b/processing/core/PFont.java @@ -352,7 +352,6 @@ public class PFont implements PConstants { parent.endShape(); parent.texture_mode = savedTextureMode; - //parent.smooth = savedSmooth; parent.drawing_text = false; parent._stroke = savedStroke; @@ -396,16 +395,9 @@ public class PFont implements PConstants { int pixels1[] = images[glyph].pixels; int pixels2[] = parent.pixels; - //int index1 = y0 * iwidth; //0; - //int index2 = 0; - - //for (int row = 0; row < height[glyph]; row++) { for (int row = y0; row < y0 + h0; row++) { - //for (int col = 0; col < width[glyph]; col++) { for (int col = x0; col < x0 + w0; col++) { int a1 = (fa * pixels1[row * iwidth + col]) >> 8; - //System.out.println(index1 + col); - //int a1 = (fa * pixels1[index1 + col]) >> 8; int a2 = a1 ^ 0xff; int p1 = pixels1[row * width[glyph] + col]; int p2 = pixels2[(yy + row-y0)*parent.width + (xx+col-x0)]; @@ -416,7 +408,6 @@ public class PFont implements PConstants { (( a1 * fg + a2 * ((p2 >> 8) & 0xff)) & 0xff00) | (( a1 * fb + a2 * ( p2 & 0xff)) >> 8)); } - //index1 += iwidth; } } } diff --git a/processing/core/todo.txt b/processing/core/todo.txt index f90f689cd..10756b32c 100644 --- a/processing/core/todo.txt +++ b/processing/core/todo.txt @@ -47,6 +47,7 @@ X colorMode broken for red() green() etc X http://processing.org/discourse/yabb/YaBB.cgi?board=Proce55ing_software_bugs;action=display;num=1068664455 X add color(gray) and color(gray, alpha) X http://processing.org/discourse/yabb/YaBB.cgi?board=Proce55ing_software_bugs;action=display;num=1089898189;start=0 +X http://processing.org/discourse/yabb/YaBB.cgi?board=Proce55ing_Software;action=display;num=1090133107 o update() mode needs to be hacked in (?) X make 'online' a boolean X pass in args[] from main @@ -121,6 +122,9 @@ X text(String text, x, y, width, height) // based on rectMode X textMode() for align left, center, right (no justify.. har!) X hex(), binary(), unhex(), unbinary() +040725 +X fix array functions not returning a value + _ processing.net -> PClient, PServer _ api for file-based renderers