Subversion Repositories wimsdev

Rev

Blame | Last modification | View Log | RSS feed

  1. /*
  2.     Sketch Elements: Chemistry molecular diagram drawing tool.
  3.    
  4.     (c) 2008 Dr. Alex M. Clark
  5.    
  6.     Released as GNUware, under the Gnu Public License (GPL)
  7.    
  8.     See www.gnu.org for details.
  9. */
  10.  
  11. package WIMSchem;
  12.  
  13. /*
  14.     Interface used to provide text metrics for some arbitrary font system
  15. */
  16.  
  17. public interface ArrangeMeasurement
  18. {
  19.     // conversion between angstrom units of molecules, and device units
  20.     double scale();
  21.     double angToX(double AX);
  22.     double angToY(double AY);
  23.     double xToAng(double PX);
  24.     double yToAng(double PY);
  25.  
  26.     // returns an array of 3 numbers: ascent, descent, width
  27.     double[] measureText(String str,double fontSize);
  28. }
  29.