MCPcopy Create free account
hub / github.com/Card-Forge/forge / getTextLeft

Method getTextLeft

forge-gui-mobile/src/forge/toolbox/FTextField.java:442–452  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

440 }
441
442 protected float getTextLeft() {
443 switch (alignment) {
444 case Align.left:
445 default:
446 return getLeftPadding();
447 case Align.center:
448 return getLeftPadding() + (getWidth() - getRightPadding() - getLeftPadding() - renderedFont.getBounds(text).width) / 2;
449 case Align.right:
450 return getWidth() - getRightPadding() - renderedFont.getBounds(text).width;
451 }
452 }
453
454 protected float getLeftPadding() {
455 return PADDING;

Callers 2

getCharIndexAtPointMethod · 0.95
drawMethod · 0.95

Calls 4

getLeftPaddingMethod · 0.95
getRightPaddingMethod · 0.95
getWidthMethod · 0.65
getBoundsMethod · 0.45

Tested by

no test coverage detected