code: public Image getSubImage(int x,int y,int width,int height) {
  		init();
  		
  		float newTextureOffsetX = ((x / (float) this.width) * textureWidth) + textureOffsetX;
  		float newTextureOffsetY = ((y / (float) this.height) * textureHeight) + textureOffsetY;
  		float newTextureWidth = ((width / (float) this.width) * textureWidth);
  		float newTextureHeight = ((height / (float) this.height) * textureHeight);
  		
  		Image sub = new Image();
  		sub.inited = true;
  		sub.texture = this.texture;
  		sub.textureOffsetX = newTextureOffsetX;
  		sub.textureOffsetY = newTextureOffsetY;
  		sub.textureWidth = newTextureWidth;
  		sub.textureHeight = newTextureHeight;
  		
  		sub.width = width;
  		sub.height = height;
  		sub.ref = ref;
  		sub.centerX = width / 2;
  		sub.centerY = height / 2;
  		
  		return sub;
  	}
docs: Get a sub-part of this image. Note that the create image retains a reference to the
  image data so should anything change it will affect sub-images too.
  
  @param x The x coordinate of the sub-image
  @param y The y coordinate of the sub-image
  @param width The width of the sub-image
  @param height The height of the sub-image
  @return The image represent the sub-part of this image