src/org/math/plot/render/AWTDrawer2D.java

00001 package org.math.plot.render;
00002 
00003 import org.math.plot.canvas.*;
00004 
00005 public class AWTDrawer2D extends AWTDrawer {
00006 
00007         public AWTDrawer2D(PlotCanvas _canvas) {
00008                 super(_canvas);
00009                 projection = new Projection2D(this);
00010         }
00011 
00012         /*// More efficient method for orthogonal display of images
00013         public void drawImage(Image img,float alpha, double[] _xyzSW, double[] _xyzSE,double[] _xyzNW) {                
00014                 int[] cornerNW = projection.screenProjection(_xyzNW);
00015                 int[] cornerSE = projection.screenProjection(_xyzSE);
00016                 int[] cornerSW = projection.screenProjection(_xyzSW);
00017                 
00018                 AffineTransform transform = new AffineTransform();
00019                 transform.translate(cornerNW[0],cornerNW[1]);
00020                 transform.scale((-cornerSW[0]+cornerSE[0])/(double)img.getWidth(canvas),(-cornerNW[1]+cornerSW[1])/(double)img.getHeight(canvas));
00021                 
00022                 Composite cs = comp2D.getComposite();
00023                 comp2D.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER,alpha));
00024                 comp2D.drawImage(img, transform,canvas);
00025                 comp2D.setComposite(cs);                
00026         }*/
00027         
00028 }

Generated on Wed Sep 5 21:44:02 2007 for jmathplot by  doxygen 1.5.1