MCPcopy Create free account
hub / github.com/HumbleUI/Skija / makeSubset

Method makeSubset

tests/java/ImageTest.java:42–56  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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();

Callers 1

executeMethod · 0.45

Calls 10

makeRasterMethod · 0.95
makeN32PremulMethod · 0.95
getCanvasMethod · 0.80
clearMethod · 0.80
makeImageSnapshotMethod · 0.80
assertNotNullMethod · 0.80
assertEqualsMethod · 0.80
getWidthMethod · 0.65
getHeightMethod · 0.65
closeMethod · 0.45

Tested by

no test coverage detected