예제 #1
0
 public void setFontSize(float size) {
   // FONT_SIZE.basicSet(this, new Double(size));
   Point2D.Double p = new Point2D.Double(0, size);
   AffineTransform tx = TRANSFORM.get(this);
   if (tx != null) {
     try {
       tx.inverseTransform(p, p);
       Point2D.Double p0 = new Point2D.Double(0, 0);
       tx.inverseTransform(p0, p0);
       p.y -= p0.y;
     } catch (NoninvertibleTransformException ex) {
       ex.printStackTrace();
     }
   }
   FONT_SIZE.set(this, Math.abs(p.y));
 }
예제 #2
0
파일: JImage.java 프로젝트: RussTedrake/lcm
  public Point2D componentToImage(Point2D p) {
    Point2D tp = null;

    try {
      tp = t.inverseTransform(p, null);
    } catch (NoninvertibleTransformException ex) {
      // can't happen.
    }

    return tp;
  }