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

Method drawRight

examples/scenes/src/FigmaScene.java:675–702  ·  view source on GitHub ↗
(Canvas canvas, int width, int height, float dpi)

Source from the content-addressed store, hash-verified

673 }
674
675 public void drawRight(Canvas canvas, int width, int height, float dpi) {
676 try (Paint fill = new Paint();
677 Paint stroke = new Paint().setMode(PaintMode.STROKE).setStrokeWidth(1);
678 Region clip = new Region();)
679 {
680 int level = canvas.save();
681 clip.setRect(IRect.makeLTRB((int) ((width - 241) * dpi), (int) (78 * dpi), (int) (width * dpi), (int) (height * dpi)));
682 canvas.clipRegion(clip);
683 canvas.translate(width - 240, 0);
684
685 // bg
686 fill.setColor(0xFFFFFFFF);
687 canvas.drawRect(Rect.makeXYWH(0, 0, 240, height - 78), fill);
688
689 stroke.setColor(0xFFE5E5E5);
690 canvas.drawLine(-0.5f, 0, -0.5f, height - 78, stroke);
691
692 drawAlign(canvas);
693 drawProps(canvas);
694 drawInstance(canvas);
695 drawConstraints(canvas);
696 drawGrid(canvas);
697 drawLayer(canvas);
698 drawFill(canvas);
699
700 canvas.restoreToCount(level);
701 }
702 }
703
704 public void drawCanvas(Canvas canvas, int width, int height, float dpi, int xpos, int ypos) {
705 try (Paint fill = new Paint();

Callers 1

drawMethod · 0.95

Calls 15

drawAlignMethod · 0.95
drawPropsMethod · 0.95
drawInstanceMethod · 0.95
drawConstraintsMethod · 0.95
drawGridMethod · 0.95
drawLayerMethod · 0.95
drawFillMethod · 0.95
setStrokeWidthMethod · 0.80
setModeMethod · 0.80
saveMethod · 0.80
setRectMethod · 0.80
clipRegionMethod · 0.80

Tested by

no test coverage detected