MCPcopy Create free account
hub / github.com/HumbleUI/JWM / paintImpl

Method paintImpl

examples/dashboard/java/PanelEvents.java:25–39  ·  view source on GitHub ↗
(Canvas canvas, int width, int height, float scale)

Source from the content-addressed store, hash-verified

23 }
24
25 @Override
26 public void paintImpl(Canvas canvas, int width, int height, float scale) {
27 try (var paint = new Paint();) {
28 paint.setColor(0xFFFFFFFF);
29 var metrics = Example.FONT12.getMetrics();
30 canvas.save();
31 canvas.translate(Example.PADDING, height - Example.PADDING - metrics.getDescent());
32 for (int i = events.size() - 1; i >= 0; --i) {
33 var event = events.get(i);
34 canvas.drawString(event.toString(), 0, 0, Example.FONT12, paint);
35 canvas.translate(0, -metrics.getCapHeight() - 8 * scale);
36 }
37 canvas.restore();
38 }
39 }
40}

Callers

nothing calls this directly

Calls 4

sizeMethod · 0.80
getMethod · 0.45
toStringMethod · 0.45
restoreMethod · 0.45

Tested by

no test coverage detected