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

Method drawTextLeft

examples/scenes/src/FigmaScene.java:775–785  ·  view source on GitHub ↗
(Canvas canvas, String text, float x, float y, float height, Font font, Paint paint)

Source from the content-addressed store, hash-verified

773 }
774
775 public float drawTextLeft(Canvas canvas, String text, float x, float y, float height, Font font, Paint paint) {
776 Rect inner = font.measureText(text, paint);
777 FontMetrics fontMetrics = metrics.get(font);
778
779 canvas.drawString(text,
780 x,
781 y + (height - fontMetrics.getHeight()) / 2f - fontMetrics.getAscent(),
782 font, paint);
783
784 return inner.getWidth();
785 }
786
787 public float drawTextCenter(Canvas canvas, String text, float x, float y, float height, Font font, Paint paint) {
788 Rect inner = font.measureText(text, paint);

Callers 10

drawTabbarMethod · 0.95
drawToolbarMethod · 0.95
drawLeftMethod · 0.95
drawAlignMethod · 0.95
drawPropsMethod · 0.95
drawInstanceMethod · 0.95
drawConstraintsMethod · 0.95
drawGridMethod · 0.95
drawLayerMethod · 0.95
drawFillMethod · 0.95

Calls 6

getHeightMethod · 0.95
measureTextMethod · 0.80
getMethod · 0.80
getAscentMethod · 0.80
getWidthMethod · 0.65
drawStringMethod · 0.45

Tested by

no test coverage detected