()
| 40 | } |
| 41 | |
| 42 | public void makeSubset() throws Exception { |
| 43 | try (var surface = Surface.makeRaster(ImageInfo.makeN32Premul(100, 80))) { |
| 44 | var canvas = surface.getCanvas(); |
| 45 | canvas.clear(0xFF112233); |
| 46 | try (var image = surface.makeImageSnapshot()) { |
| 47 | var subset = image.makeSubset(new IRect(10, 20, 70, 50)); |
| 48 | assertNotNull(subset); |
| 49 | if (subset != null) { |
| 50 | assertEquals(60, subset.getWidth()); |
| 51 | assertEquals(30, subset.getHeight()); |
| 52 | subset.close(); |
| 53 | } |
| 54 | } |
| 55 | } |
| 56 | } |
| 57 | |
| 58 | public void refCntToStringAfterClose() throws Exception { |
| 59 | Bitmap bmp = new Bitmap(); |
no test coverage detected