| 1286 | /// |
| 1287 | /// a mirrored image |
| 1288 | public Image mirror() { |
| 1289 | int width = getWidth(); |
| 1290 | int height = getHeight(); |
| 1291 | int[] tmp = getRGB(); |
| 1292 | int[] arr = new int[width * height]; |
| 1293 | for (int x = 0; x < width; x++) { |
| 1294 | for (int y = 0; y < height; y++) { |
| 1295 | arr[x + y * width] = tmp[width - x - 1 + y * width]; |
| 1296 | } |
| 1297 | } |
| 1298 | Image i = new Image(Display.impl.createImage(arr, width, height)); |
| 1299 | i.opaque = opaque; |
| 1300 | i.opaqueTested = opaqueTested; |
| 1301 | return i; |
| 1302 | } |
| 1303 | |
| 1304 | /// Returns an instance of this image rotated by the given number of degrees. By default 90 degree |
| 1305 | /// angle divisions are supported, anything else is implementation dependent. This method assumes |