public static Object paintCachedTeXFormula(Object o,Graphics2D g) throws ParseException {
  if (o == null || !(o instanceof CachedTeXFormula)) {
    return null;
  }
  CachedTeXFormula cached=(CachedTeXFormula)o;
  SoftReference<CachedImage> img=cache.get(cached);
  if (img == null || img.get() == null) {
    img=makeImage(cached);
  }
  g.drawImage(img.get().image,identity,null);
  return cached;
}

public static Object paintCachedTeXFormula ( Object o , Graphics2D g ) throws ParseException { if ( o == null || ! ( o instanceof CachedTeXFormula ) ) { return null ; } CachedTeXFormula cached = ( CachedTeXFormula ) o ; SoftReference < CachedImage > img = cache . get ( cached ) ; if ( img == null || img . get ( ) == null ) { img = makeImage ( cached ) ; } g . drawImage ( img . get ( ) . image , identity , null ) ; return cached ; }
paint a cached formula
