| 1268 | /// |
| 1269 | /// An array of all the possible images that can be created from the source |
| 1270 | public Image subImage(int x, int y, int width, int height, boolean processAlpha) { |
| 1271 | // we use the getRGB API rather than the mutable image API to allow translucency to |
| 1272 | // be maintained in the newly created image |
| 1273 | int[] arr = new int[width * height]; |
| 1274 | getRGB(arr, 0, x, y, width, height); |
| 1275 | |
| 1276 | Image i = new Image(Display.impl.createImage(arr, width, height)); |
| 1277 | i.opaque = opaque; |
| 1278 | i.opaqueTested = opaqueTested; |
| 1279 | return i; |
| 1280 | } |
| 1281 | |
| 1282 | /// Creates a mirror image for the given image which is useful for some RTL scenarios. Notice that this |
| 1283 | /// method isn't the most efficient way to perform this task and is designed for portability over efficiency. |