Exemplo n.º 1
0
 public <G, V, A> BufferedImage image(
     Renderer r, Glyphset<G, V> g, Aggregator<V, A> agg, Transfer<? super A, Color> t)
     throws Exception {
   AffineTransform vt = Util.zoomFit(g.bounds(), width, height);
   Selector<G> selector = TouchesPixel.make(g);
   Aggregates<A> aggs = r.aggregate(g, selector, agg, vt, width, height);
   Transfer.Specialized<? super A, Color> t2 = t.specialize(aggs);
   Aggregates<Color> imgAggs = r.transfer(aggs, t2);
   BufferedImage img = AggregateUtils.asImage(imgAggs, width, height, Color.white);
   return img;
 }