void (ScaleContext ctx) { System.out.println("ScaleContext: " + ctx); BufferedImage image = TestScaleHelper.loadImage(Path.of(PlatformTestUtil.getPlatformTestDataPath() + "ui/myIcon_20x10_dataScaled@2x.svg"), ctx); assertNotNull(image); double scale = ctx.getScale(DerivedScaleType.PIX_SCALE) / 2 /* count the icon's @2x format */; assertEquals("wrong image width", PaintUtil.RoundingMode.ROUND.round(20 * scale), image.getWidth()); assertEquals("wrong image height", PaintUtil.RoundingMode.ROUND.round(10 * scale), image.getHeight()); }