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

Method drawLayer

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

Source from the content-addressed store, hash-verified

591 }
592
593 public void drawLayer(Canvas canvas) {
594 try (Paint fill = new Paint();
595 Paint stroke = new Paint().setMode(PaintMode.STROKE).setStrokeWidth(1);)
596 {
597 canvas.translate(0, 16);
598 fill.setColor(0xFF333333);
599 drawTextLeft(canvas, "Layer", 16, 0, 16, uiFontBold, fill);
600 canvas.translate(0, 32);
601
602 canvas.save();
603 canvas.translate(16, 0);
604 stroke.setColor(0xFFB3B3B3);
605 canvas.drawPath(icons.get("Transparency"), stroke);
606 canvas.translate(24, 0);
607 float w = drawTextLeft(canvas, "Pass Through", 0, 0, 16, uiFont, fill);
608 canvas.translate(w + 6, 7);
609 canvas.drawPath(icons.get("Chevron"), stroke);
610 canvas.restore();
611
612 canvas.save();
613 canvas.translate(160, 0);
614 drawTextLeft(canvas, "100%", 0, 0, 16, uiFont, fill);
615 canvas.translate(48, 0);
616 stroke.setColor(0xFF333333);
617 canvas.drawPath(icons.get("Eye Stroke"), stroke);
618 canvas.drawPath(icons.get("Eye Fill"), fill);
619 canvas.restore();
620
621 canvas.translate(0, 32);
622 stroke.setColor(0xFFE5E5E5);
623 canvas.drawLine(0, 0.5f, 240, 0.5f, stroke);
624 }
625 }
626
627 public void drawFill(Canvas canvas) {
628 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