// my sprite class class Sprite { int x, y, top, bottom, left, right; PImage img; Sprite(String i, int ix, int iy) { img = loadImage(i); // self centering, since Moblie Processing lacks imageMode(CENTER); ? update_edges(); x = ix; y = iy; } // alternate constructor with default x, y Sprite(String i) { img = loadImage(i); x = 0; y = 0; } void update_edges() { top = y; bottom = top + img.height; left = x; right = x + img.width; } void xy(int ix, int iy) { x = ix; y = iy; } void draw() { update_edges(); image(img, x - img.width/2, y - img.height/2); } }