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

Method drawFill

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

Source from the content-addressed store, hash-verified

625 }
626
627 public void drawFill(Canvas canvas) {
628 try (Paint fill = new Paint();
629 Paint stroke = new Paint().setMode(PaintMode.STROKE).setStrokeWidth(1);)
630 {
631 canvas.translate(0, 16);
632 canvas.save();
633 canvas.translate(16, 0);
634 fill.setColor(0xFF333333);
635 drawTextLeft(canvas, "Fill", 0, 0, 16, uiFontBold, fill);
636 canvas.translate(160, 0);
637 fill.setColor(0xFF333333);
638 canvas.drawPath(icons.get("Style"), fill);
639 canvas.translate(32, 0);
640 stroke.setColor(0xFF333333);
641 canvas.drawPath(icons.get("Plus"), stroke);
642 canvas.restore();
643 canvas.translate(0, 32);
644
645 canvas.save();
646 canvas.translate(16, 0);
647 stroke.setColor(0xFFE5E5E5).setStrokeWidth(0.5f);
648 canvas.drawRect(Rect.makeXYWH(0.25f, 0.25f, 15.5f, 15.5f), stroke);
649 stroke.setStrokeWidth(1f);
650 canvas.translate(24, 0);
651 fill.setColor(0xFFB3B3B3);
652 drawTextLeft(canvas, "FFFFFF", 0, 0, 16, uiFont, fill);
653 canvas.restore();
654
655 canvas.save();
656 canvas.translate(112, 0);
657 drawTextLeft(canvas, "100%", 0, 0, 16, uiFont, fill);
658 canvas.restore();
659
660 canvas.save();
661 canvas.translate(176, 0);
662 stroke.setColor(0xFF333333);
663 canvas.drawPath(icons.get("Eye Closed"), stroke);
664 canvas.translate(32, 0);
665 canvas.drawPath(icons.get("Minus"), stroke);
666 canvas.restore();
667
668 canvas.translate(0, 32);
669
670 stroke.setColor(0xFFE5E5E5);
671 canvas.drawLine(0, 0.5f, 240, 0.5f, stroke);
672 }
673 }
674
675 public void drawRight(Canvas canvas, int width, int height, float dpi) {
676 try (Paint fill = new Paint();

Callers 1

drawRightMethod · 0.95

Calls 11

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

Tested by

no test coverage detected