We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EMFRenderer.textAlignMode is ignored when drawing text. Thus the text is being placed wrong unless textAlignMode is TA_LEFT.
The following patch works for me. I have tested it with TA_CENTER:
public void drawOrAppendText(String text, double x, double y) { FontRenderContext frc = g2.getFontRenderContext(); TextLayout layout = new TextLayout(text, g2.getFont(), frc); double textWidth = layout.getBounds().getWidth(); if ((getTextAlignMode() & EMFConstants.TA_CENTER) != 0) { x = x - (textWidth / 2); } else if ((getTextAlignMode() & EMFConstants.TA_RIGHT) != 0) { x = x - textWidth; } ...
The text was updated successfully, but these errors were encountered:
No branches or pull requests
EMFRenderer.textAlignMode is ignored when drawing text. Thus the text is being placed wrong unless textAlignMode is TA_LEFT.
The following patch works for me. I have tested it with TA_CENTER:
The text was updated successfully, but these errors were encountered: