com.partnersoft.v3x.apps.MapBrowser
Class RenderedScale

java.lang.Object
  extended by com.partnersoft.v3x.apps.MapBrowser.RenderedScale
All Implemented Interfaces:
java.io.Serializable

public class RenderedScale
extends java.lang.Object
implements java.io.Serializable

The scale and origin for a (usually continuous) set of rendered map images.

See Also:
Serialized Form

Constructor Summary
RenderedScale()
           
 
Method Summary
 DoubleRectangle expandToMatchTiling(DoubleRectangle original)
          This is the same as groundCoveredBy(tilesCovering(groundRect)).
 double getHeight()
           
 int getImageHeight()
           
 int getImageWidth()
           
 double getOriginX()
           
 double getOriginY()
           
 Scale getScale()
           
 double getWidth()
           
 DoubleRectangle groundCoveredBy(IntegerRectangle sheets)
          Returns the DoubleRectangle of ground coordinates matching the given IntegerRectangle of sheets.
 Coord2D originOf(Coord2D tile)
          Returns the origin in ground coordinates of the given image tile.
 Coord2D originOf(int x, int y)
          Returns the origin in ground coordinates of the given image tile.
 void setImageHeight(int newImageHeight)
           
 void setImageWidth(int newImageWidth)
           
 void setOriginX(double newOriginX)
           
 void setOriginY(double newOriginY)
           
 void setScale(Scale newScale)
           
 Coord2D tileCovering(Coord2D coord)
          Returns the x,y location of the tile containing the given ground coordinate.
 IntegerRectangle tilesCovering(DoubleRectangle groundRect)
          Returns the smallest IntegerRectangle of sheets containing the given DoubleRectangle of ground coordinates.
 int xToSheet(double x)
          Returns the X coordinate of the sheet column with the given ground coordinate.
 int yToSheet(double y)
          Returns the Y coordinate of the sheet row with the given ground coordinate.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RenderedScale

public RenderedScale()
Method Detail

xToSheet

public int xToSheet(double x)
Returns the X coordinate of the sheet column with the given ground coordinate.


yToSheet

public int yToSheet(double y)
Returns the Y coordinate of the sheet row with the given ground coordinate.


tileCovering

public Coord2D tileCovering(Coord2D coord)
Returns the x,y location of the tile containing the given ground coordinate.


originOf

public Coord2D originOf(Coord2D tile)
Returns the origin in ground coordinates of the given image tile.


originOf

public Coord2D originOf(int x,
                        int y)
Returns the origin in ground coordinates of the given image tile.


tilesCovering

public IntegerRectangle tilesCovering(DoubleRectangle groundRect)
Returns the smallest IntegerRectangle of sheets containing the given DoubleRectangle of ground coordinates.


groundCoveredBy

public DoubleRectangle groundCoveredBy(IntegerRectangle sheets)
Returns the DoubleRectangle of ground coordinates matching the given IntegerRectangle of sheets.


expandToMatchTiling

public DoubleRectangle expandToMatchTiling(DoubleRectangle original)
This is the same as groundCoveredBy(tilesCovering(groundRect)). It expands the ground coordinate rectangle to "snap to" the lines formed by the tiling.


getScale

public Scale getScale()

setScale

public void setScale(Scale newScale)

getOriginX

public double getOriginX()

setOriginX

public void setOriginX(double newOriginX)

getOriginY

public double getOriginY()

setOriginY

public void setOriginY(double newOriginY)

getImageWidth

public int getImageWidth()

setImageWidth

public void setImageWidth(int newImageWidth)

getImageHeight

public int getImageHeight()

setImageHeight

public void setImageHeight(int newImageHeight)

getWidth

public double getWidth()

getHeight

public double getHeight()