Package elemental.canvas

Examples of elemental.canvas.CanvasRenderingContext2D


    return calculator.getFontDimensions().getCharacterWidth();
  }

  @Override
  public double measureStringWidth(String text) {
    CanvasRenderingContext2D context = (CanvasRenderingContext2D) canvas.getContext("2d");
    context.setFont(calculator.getFont());
    TextMetrics metrics = context.measureText(text);
    return metrics.getWidth();
  }
View Full Code Here

TOP

Related Classes of elemental.canvas.CanvasRenderingContext2D

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.