Shape getTextShape(Graphics2D g2d, String str, Font font) {
        FontRenderContext frc = g2d.getFontRenderContext();
        TextLayout tl = new TextLayout(str, font, frc);
        return tl.getOutline(null);
    }

 

Related Examples

相关文章:

  • 2021-10-11
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-22
  • 2022-12-23
  • 2022-01-22
  • 2022-12-23
猜你喜欢
  • 2021-07-24
  • 2021-10-07
  • 2021-09-29
  • 2022-12-23
  • 2021-09-18
相关资源
相似解决方案