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

Method draw

examples/scenes/src/GeometryScene.java:7–25  ·  view source on GitHub ↗
(Canvas canvas, int width, int height, float dpi, int xpos, int ypos)

Source from the content-addressed store, hash-verified

5
6public class GeometryScene extends Scene {
7 @Override
8 public void draw(Canvas canvas, int width, int height, float dpi, int xpos, int ypos) {
9 var borderStroke = new Paint().setColor(0xFFFF0751).setMode(PaintMode.STROKE).setStrokeWidth(1f);
10 canvas.drawRect(Rect.makeLTRB(10, 10, width - 10, height - 10), borderStroke);
11 canvas.translate(30, 30);
12
13 drawPoints(canvas);
14 drawLines(canvas);
15 drawArcs(canvas);
16 drawVertices(canvas);
17 drawPatch(canvas);
18 drawRotate(canvas);
19 drawOtherTransform(canvas);
20 drawRectInscribed(canvas, new Paint().setColor(0xFF1D7AA2).setMode(PaintMode.STROKE).setStrokeWidth(1f));
21 drawRectInscribed(canvas, new Paint().setColor(0xFF6DC1B3).setMode(PaintMode.STROKE).setStrokeWidth(5f));
22 drawRectInscribed(canvas, new Paint().setColor(0xFF9BC730));
23 drawClips(canvas);
24 drawRegions(canvas, dpi);
25 }
26
27 public void drawPoints(Canvas canvas) {
28 var strokeHalfPx = new Paint().setStrokeWidth(0.5f);

Callers

nothing calls this directly

Calls 15

drawPointsMethod · 0.95
drawLinesMethod · 0.95
drawArcsMethod · 0.95
drawVerticesMethod · 0.95
drawPatchMethod · 0.95
drawRotateMethod · 0.95
drawOtherTransformMethod · 0.95
drawRectInscribedMethod · 0.95
drawClipsMethod · 0.95
drawRegionsMethod · 0.95
setStrokeWidthMethod · 0.80
setModeMethod · 0.80

Tested by

no test coverage detected