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

Method drawGrid

examples/scenes/src/FigmaScene.java:572–591  ·  view source on GitHub ↗
(Canvas canvas)

Source from the content-addressed store, hash-verified

570 }
571
572 public void drawGrid(Canvas canvas) {
573 try (Paint fill = new Paint();
574 Paint stroke = new Paint().setMode(PaintMode.STROKE).setStrokeWidth(1);)
575 {
576 canvas.translate(0, 16);
577 canvas.save();
578 canvas.translate(16, 0);
579 fill.setColor(0xFFB3B3B3);
580 drawTextLeft(canvas, "Layout Grid", 0, 0, 16, uiFontBold, fill);
581
582 canvas.translate(192, 0);
583 stroke.setColor(0xFFE5E5E5);
584 canvas.drawPath(icons.get("Plus"), stroke);
585 canvas.restore();
586 canvas.translate(0, 32);
587
588 stroke.setColor(0xFFE5E5E5);
589 canvas.drawLine(0, 0.5f, 240, 0.5f, stroke);
590 }
591 }
592
593 public void drawLayer(Canvas canvas) {
594 try (Paint fill = new Paint();

Callers 1

drawRightMethod · 0.95

Calls 10

drawTextLeftMethod · 0.95
setStrokeWidthMethod · 0.80
setModeMethod · 0.80
saveMethod · 0.80
getMethod · 0.80
restoreMethod · 0.80
translateMethod · 0.45
setColorMethod · 0.45
drawPathMethod · 0.45
drawLineMethod · 0.45

Tested by

no test coverage detected