package org.opengis.go.display.canvas.map2d;

import javax.units.Unit;

import org.opengis.go.display.canvas.CanvasState;
import org.opengis.spatialschema.geometry.Envelope;


/**
 * The Map2DState explicitly names the properties necessary 
 * to define a rectangular, 2D canvas.
 * 
 * @see Map2D
 *  
 * @author crossley
 */
public interface Map2DState extends CanvasState {

    /**
     * Gets the pixel width of the Canvas represented by this 
     * Map2DState.
     * @return the pixel width
     */             
    int getPixelWidth();
    
    /**
     * Gets the pixel height of the Canvas represented by this
     * Map2DState. 
     * @return the pixel height
     */
    int getPixelHeight();
    
    /**
     * Gets the map width of the Canvas represented by this
     * Map2DState, in terms of the given unit.
     * @param unit the Unit for the return value
     * @return the width in terms of the given unit
     */
    double getMapWidth(Unit unit);
    
    /**
     * Gets the scale of the Canvas represented by this 
     * Map2DState.
     * @return the scale
     */
    double getScale();
    
    /**
     * Gets the Envelope of the Canvas
     * represented by this Map2DState.
     * @return the envelope
     */
    Envelope getEnvelope();
    
}

 

Ads help maintain this website.