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

Method drawInstance

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

Source from the content-addressed store, hash-verified

468 }
469
470 public void drawInstance(Canvas canvas) {
471 try (Paint fill = new Paint();
472 Paint stroke = new Paint().setMode(PaintMode.STROKE).setStrokeWidth(1);)
473 {
474 canvas.translate(0, 16);
475
476 canvas.save();
477 canvas.translate(16, 0);
478 fill.setColor(0xFF333333);
479 drawTextLeft(canvas, "Instance", 0, 0, 16, uiFontBold, fill);
480 canvas.translate(180, -12);
481 stroke.setColor(0xFF333333);
482 canvas.drawPath(icons.get("Reset"), stroke);
483 canvas.restore();
484 canvas.translate(0, 32);
485
486 canvas.save();
487 canvas.translate(16, 0);
488 float w = drawTextLeft(canvas, "Component 1", 0, 0, 16, uiFont, fill);
489 canvas.translate(w + 6, 7);
490 stroke.setColor(0xFFB3B3B3);
491 canvas.drawPath(icons.get("Chevron"), stroke);
492 canvas.restore();
493 canvas.translate(0, 32);
494
495 fill.setColor(0xFF18A0FB);
496 drawTextLeft(canvas, "Go to Main Component", 16, 0, 16, uiFont, fill);
497 canvas.translate(0, 32);
498
499 stroke.setColor(0xFFE5E5E5);
500 canvas.drawLine(0, 0.5f, 240, 0.5f, stroke);
501 }
502 }
503
504 public void drawConstraints(Canvas canvas) {
505 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