public void copyRegionHFlip(CPRect r, CPLayer source) {
		CPRect rect = new CPRect(0, 0, width, height);
		rect.clip(r);

		for (int j = rect.top; j < rect.bottom; j++) {
			for (int i = rect.left, s = rect.right - 1; i < rect.right; i++, s--) {
				data[i + j * width] = source.data[s + j * width];
			}
		}
	}