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

Method fillWithPaint

tests/java/PathTest.java:292–332  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

290 }
291
292 public void fillWithPaint() throws Exception {
293 try (var paint = new Paint();
294 var src = new PathBuilder().addRect(Rect.makeXYWH(10, 10, 50, 50)).build();
295 var dst = new PathBuilder();
296 ) {
297
298 paint.setMode(PaintMode.STROKE).setStrokeWidth(5);
299
300 Matrix33 identityMatrix = Matrix33.IDENTITY;
301 boolean result = src.fillWithPaint(paint, dst, null, identityMatrix);
302 assertEquals(true, result);
303 assertEquals(false, dst.isEmpty());
304
305 dst.reset();
306 Matrix33 scaleMatrix = Matrix33.makeScale(2.0f, 2.0f);
307 result = src.fillWithPaint(paint, dst, null, scaleMatrix);
308 assertEquals(true, result);
309 assertEquals(false, dst.isEmpty());
310
311 dst.reset();
312 Rect cullRect = Rect.makeXYWH(0, 0, 100, 100);
313 result = src.fillWithPaint(paint, dst, cullRect, identityMatrix);
314 assertEquals(true, result);
315 assertEquals(false, dst.isEmpty());
316
317 dst.reset();
318 result = src.fillWithPaint(paint, dst, identityMatrix);
319 assertEquals(true, result);
320 assertEquals(false, dst.isEmpty());
321
322 dst.reset();
323 result = src.fillWithPaint(paint, dst);
324 assertEquals(true, result);
325 assertEquals(false, dst.isEmpty());
326
327 dst.reset();
328 result = src.fillWithPaint(paint, dst, 3.0f);
329 assertEquals(true, result);
330 assertEquals(false, dst.isEmpty());
331 }
332 }
333}

Callers

nothing calls this directly

Calls 8

makeScaleMethod · 0.95
addRectMethod · 0.80
setStrokeWidthMethod · 0.80
setModeMethod · 0.80
assertEqualsMethod · 0.80
isEmptyMethod · 0.65
buildMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected