org.mapfish.print
Class Transformer

java.lang.Object
  extended by org.mapfish.print.Transformer
All Implemented Interfaces:
java.lang.Cloneable

public class Transformer
extends java.lang.Object
implements java.lang.Cloneable

Class that deals with the geometric tranformation between the geographic, bitmap, and paper space for a map rendering.


Field Summary
 float maxGeoX
           
 float maxGeoY
           
 float minGeoX
           
 float minGeoY
           
 
Constructor Summary
Transformer(float centerX, float centerY, int paperWidth, int paperHeight, int scale, int dpi, DistanceUnit unitEnum, double rotation)
           
 
Method Summary
 Transformer clone()
           
 java.awt.geom.AffineTransform getBaseTransform()
           
 java.awt.geom.AffineTransform getBitmapTransform()
           
 float getGeoH()
           
 java.awt.geom.AffineTransform getGeoTransform(boolean reverseRotation)
           
 float getGeoW()
           
 float getMaxGeoX()
           
 float getMaxGeoY()
           
 float getMinGeoX()
           
 float getMinGeoY()
           
 float getPaperH()
           
 float getPaperPosX()
           
 float getPaperPosY()
           
 float getPaperW()
           
 java.awt.geom.AffineTransform getPdfTransform()
           
 float getResolution()
           
 long getRotatedBitmapH()
           
 long getRotatedBitmapW()
           
 float getRotatedGeoH()
           
 float getRotatedGeoW()
           
 float getRotatedMaxGeoX()
           
 float getRotatedMaxGeoY()
           
 float getRotatedMinGeoX()
           
 float getRotatedMinGeoY()
           
 float getRotatedPaperH()
           
 float getRotatedPaperW()
           
 long getRotatedSvgH()
           
 long getRotatedSvgW()
           
 double getRotation()
           
 int getScale()
           
 float getStraightBitmapH()
           
 float getStraightBitmapW()
           
 long getStraightSvgH()
           
 long getStraightSvgW()
           
 int getSvgFactor()
           
 java.awt.geom.AffineTransform getSvgTransform()
           
 void setClipping(com.lowagie.text.pdf.PdfContentByte dc)
           
 void setMapPos(float x, float y)
           
 void setResolution(float resolution)
           
 void setRotation(double rotation)
           
 void zoom(Transformer mainTransformer, float factor)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

minGeoX

public float minGeoX

minGeoY

public float minGeoY

maxGeoX

public float maxGeoX

maxGeoY

public float maxGeoY
Constructor Detail

Transformer

public Transformer(float centerX,
                   float centerY,
                   int paperWidth,
                   int paperHeight,
                   int scale,
                   int dpi,
                   DistanceUnit unitEnum,
                   double rotation)
Method Detail

getGeoW

public float getGeoW()

getGeoH

public float getGeoH()

getStraightBitmapW

public float getStraightBitmapW()

getStraightBitmapH

public float getStraightBitmapH()

getRotatedBitmapW

public long getRotatedBitmapW()

getRotatedBitmapH

public long getRotatedBitmapH()

getRotatedGeoW

public float getRotatedGeoW()

getRotatedGeoH

public float getRotatedGeoH()

getRotatedPaperW

public float getRotatedPaperW()

getRotatedPaperH

public float getRotatedPaperH()

getRotatedMinGeoX

public float getRotatedMinGeoX()

getRotatedMaxGeoX

public float getRotatedMaxGeoX()

getRotatedMinGeoY

public float getRotatedMinGeoY()

getRotatedMaxGeoY

public float getRotatedMaxGeoY()

getRotatedSvgW

public long getRotatedSvgW()

getRotatedSvgH

public long getRotatedSvgH()

getStraightSvgW

public long getStraightSvgW()

getStraightSvgH

public long getStraightSvgH()

getPaperW

public float getPaperW()

getPaperH

public float getPaperH()

setMapPos

public void setMapPos(float x,
                      float y)

getPaperPosX

public float getPaperPosX()

getPaperPosY

public float getPaperPosY()

getBaseTransform

public java.awt.geom.AffineTransform getBaseTransform()
Returns:
a transformer with paper dimensions, but that takes into account the position of the map and its rotation.

getGeoTransform

public java.awt.geom.AffineTransform getGeoTransform(boolean reverseRotation)
Parameters:
reverseRotation - True to do the rotation in the other direction
Returns:
The affine transformation to go from geographic coordinated to paper coordinates

getSvgTransform

public java.awt.geom.AffineTransform getSvgTransform()

getPdfTransform

public java.awt.geom.AffineTransform getPdfTransform()

getBitmapTransform

public java.awt.geom.AffineTransform getBitmapTransform()

getScale

public int getScale()

zoom

public void zoom(Transformer mainTransformer,
                 float factor)

clone

public Transformer clone()
Overrides:
clone in class java.lang.Object

getMinGeoX

public float getMinGeoX()

getMinGeoY

public float getMinGeoY()

getMaxGeoX

public float getMaxGeoX()

getMaxGeoY

public float getMaxGeoY()

getSvgFactor

public int getSvgFactor()

getRotation

public double getRotation()

setClipping

public void setClipping(com.lowagie.text.pdf.PdfContentByte dc)

setRotation

public void setRotation(double rotation)

getResolution

public float getResolution()

setResolution

public void setResolution(float resolution)


Copyright © 2009 Camptocamp SA. All Rights Reserved.