tl.setOffset(centerx,centery); tl.mergeOnto(tm);
if(tm != null) { tl.setOffset(centerx,centery); tl.mergeOnto(tm); }
    public Rectangle commitPaint(MultilayerPlane mp, int x, int y, int initLayer) {        Rectangle bounds = this.getBounds();        int centerx = (int)(x - (bounds.width / 2));        int centery = (int)(y - (bounds.height / 2));                ListIterator itr = getLayers();        while(itr.hasNext()) {            TileLayer tl = (TileLayer)itr.next();                        TileLayer tm = (TileLayer) mp.getLayer(initLayer++);            tl.setOffset(centerx,centery);            tl.mergeOnto(tm);        }                return new Rectangle(centerx, centery, bounds.width, bounds.height);    }