com.partnersoft.maps.render
Interface DrawingSurface

All Known Implementing Classes:
AbstractDrawingSurface, DoNothingDrawingSurface, Java2DDrawingSurface, OpenglDrawingSurface, SelectionDrawingSurface

public interface DrawingSurface

Device- or purpose-specific geographic drawing surface. Provides a uniform interface for lower-level drawing and selection details.

Copyright 2004-2009 Partner Software, Inc.

Version:
$Id: DrawingSurface.java 2328 2010-01-06 15:38:22Z paul $
Author:
Paul Reavis

Field Summary
static int QUALITY_GOOD
           
static int QUALITY_OK
           
static int QUALITY_POOR
           
static int RENDER_EPHEMERA
           
static int RENDER_INDICATION
           
static int RENDER_RASTER
           
static int RENDER_RETICLE
           
static int RENDER_SELECTION
           
static int RENDER_VECTOR
           
 
Method Summary
 void clear()
           
 void copyBackBuffer()
          Copies the back buffer to the onscreen or "front" buffer.
 int displayListFor(long key)
           
 int displayListFor(java.lang.Object key)
           
 void drawDisplayList(int displayListID)
           
 void drawImage(int dataID, double x, double y, int offsetX, int offsetY, int rotation, ImageSource image, double scale, int pixelsWide, int pixelsHigh)
           
 void drawLiteralPoints(LiteralPointFile literalPoints)
           
 void drawPoint(int dataID, double x, double y, int offsetX, int offsetY, int rotation)
           
 void drawPolygon(int dataID, DoubleBuffer coords)
           
 void drawPolygon(int dataID, DynamicDoubleArray coords)
           
 void drawPolyline(int dataID, DoubleBuffer coords)
           
 void drawPolyline(int dataID, DynamicDoubleArray coords)
           
 void drawPolyline(int dataID, XyPolyline polyline)
           
 void drawRasterImage(RasterImage image)
           
 void drawText(int dataID, double x, double y, int offsetX, int offsetY, int rotation, int alignment, java.lang.String text)
           
 void drawWheelMenu(WheelMenu menu)
           
 void drawWheelMenuCenter(WheelMenu menu)
           
 void endDisplayList()
           
 void endTile()
           
 boolean isBackBufferSupported()
          Returns true if this surface offers a backing buffer.
 boolean isDirty()
           
 boolean isDisplayListSupported()
           
 boolean isDrawingToBackBuffer()
          Returns true if the surface is currently drawing to a backing buffer.
 void popName()
           
 void popState()
           
 void pushName(int i)
           
 void pushState()
           
 void removeDisplayList(int displayListID)
           
 void setBackgroundColor(int color)
           
 void setDrawingToBackBuffer(boolean isit)
          Sets whether the surface should draw to the backing buffer (true) or to the onscreen or "front" buffer (false).
 void setForegroundColor(int newRGB)
           
 void setFrame(MapViewFrame frame)
           
 void setImageStyle(ImageStyle style)
           
 void setImageStyle(int style)
           
 void setImageStyle(java.lang.String styleName)
           
 void setMapSet(MapSet newMapSet)
           
 void setPointStyle(int style)
           
 void setPointStyle(PointStyle style)
           
 void setPointStyle(java.lang.String styleName)
           
 void setPolygonStyle(int style)
           
 void setPolygonStyle(PolygonStyle style)
           
 void setPolygonStyle(java.lang.String styleName)
           
 void setPolylineStyle(int style)
           
 void setPolylineStyle(PolylineStyle style)
           
 void setPolylineStyle(java.lang.String styleName)
           
 void setPrinting(boolean printing)
           
 void setRenderMode(int newMode)
           
 void setRenderQuality(int newQuality)
           
 void setRenderScaleRegion(RenderScaleRegion scaleRegion)
           
 void setShowInvisibleGraphics(boolean showInvisibleGraphics)
           
 void setTextStyle(int style)
           
 void setTextStyle(java.lang.String styleName)
           
 void setTextStyle(TextStyle style)
           
 int startDisplayList(long key)
           
 int startDisplayList(java.lang.Object key)
           
 void startDrawing()
           
 void startTile(RoverBytes bytes)
          Sets up the transformations for the coordinates that are coming in.
 void stopDrawing()
           
 

Field Detail

RENDER_RASTER

static final int RENDER_RASTER
See Also:
Constant Field Values

RENDER_VECTOR

static final int RENDER_VECTOR
See Also:
Constant Field Values

RENDER_EPHEMERA

static final int RENDER_EPHEMERA
See Also:
Constant Field Values

RENDER_INDICATION

static final int RENDER_INDICATION
See Also:
Constant Field Values

RENDER_SELECTION

static final int RENDER_SELECTION
See Also:
Constant Field Values

RENDER_RETICLE

static final int RENDER_RETICLE
See Also:
Constant Field Values

QUALITY_POOR

static final int QUALITY_POOR
See Also:
Constant Field Values

QUALITY_OK

static final int QUALITY_OK
See Also:
Constant Field Values

QUALITY_GOOD

static final int QUALITY_GOOD
See Also:
Constant Field Values
Method Detail

setMapSet

void setMapSet(MapSet newMapSet)

setRenderMode

void setRenderMode(int newMode)

setPrinting

void setPrinting(boolean printing)

setRenderQuality

void setRenderQuality(int newQuality)

setFrame

void setFrame(MapViewFrame frame)

setShowInvisibleGraphics

void setShowInvisibleGraphics(boolean showInvisibleGraphics)

isDirty

boolean isDirty()

startDrawing

void startDrawing()

clear

void clear()

stopDrawing

void stopDrawing()

startTile

void startTile(RoverBytes bytes)
Sets up the transformations for the coordinates that are coming in.

Parameters:
bytes - everything we need to set up our transformation.

endTile

void endTile()

setBackgroundColor

void setBackgroundColor(int color)

setForegroundColor

void setForegroundColor(int newRGB)

setRenderScaleRegion

void setRenderScaleRegion(RenderScaleRegion scaleRegion)

setPolygonStyle

void setPolygonStyle(int style)

setImageStyle

void setImageStyle(int style)

setPolylineStyle

void setPolylineStyle(int style)

setPointStyle

void setPointStyle(int style)

setTextStyle

void setTextStyle(int style)

setPolygonStyle

void setPolygonStyle(PolygonStyle style)

setImageStyle

void setImageStyle(ImageStyle style)

setPolylineStyle

void setPolylineStyle(PolylineStyle style)

setPointStyle

void setPointStyle(PointStyle style)

setTextStyle

void setTextStyle(TextStyle style)

setPolygonStyle

void setPolygonStyle(java.lang.String styleName)

setImageStyle

void setImageStyle(java.lang.String styleName)

setPolylineStyle

void setPolylineStyle(java.lang.String styleName)

setPointStyle

void setPointStyle(java.lang.String styleName)

setTextStyle

void setTextStyle(java.lang.String styleName)

pushState

void pushState()

popState

void popState()

drawPolygon

void drawPolygon(int dataID,
                 DoubleBuffer coords)

drawPolygon

void drawPolygon(int dataID,
                 DynamicDoubleArray coords)

drawPolyline

void drawPolyline(int dataID,
                  DoubleBuffer coords)

drawPolyline

void drawPolyline(int dataID,
                  DynamicDoubleArray coords)

drawPolyline

void drawPolyline(int dataID,
                  XyPolyline polyline)

drawPoint

void drawPoint(int dataID,
               double x,
               double y,
               int offsetX,
               int offsetY,
               int rotation)

drawText

void drawText(int dataID,
              double x,
              double y,
              int offsetX,
              int offsetY,
              int rotation,
              int alignment,
              java.lang.String text)

drawImage

void drawImage(int dataID,
               double x,
               double y,
               int offsetX,
               int offsetY,
               int rotation,
               ImageSource image,
               double scale,
               int pixelsWide,
               int pixelsHigh)

drawLiteralPoints

void drawLiteralPoints(LiteralPointFile literalPoints)

drawRasterImage

void drawRasterImage(RasterImage image)

drawWheelMenuCenter

void drawWheelMenuCenter(WheelMenu menu)

drawWheelMenu

void drawWheelMenu(WheelMenu menu)

isBackBufferSupported

boolean isBackBufferSupported()
Returns true if this surface offers a backing buffer. Backing buffers can improve performance since they only need to be updated when the map view frame changes, the legend changes, or the vector data changes.

If this method returns true, the implementation must also support the methods setDrawingToBackBuffer() and copyBackBuffer()


isDrawingToBackBuffer

boolean isDrawingToBackBuffer()
Returns true if the surface is currently drawing to a backing buffer. Returns false if it is not (or if it doesn't have one).

Returns:
true if surface is currently drawing to a backing buffer.

setDrawingToBackBuffer

void setDrawingToBackBuffer(boolean isit)
Sets whether the surface should draw to the backing buffer (true) or to the onscreen or "front" buffer (false). Throws UnsupportedOperationException if isBackBufferSupported() returns false.

Parameters:
isit - true if surface should start drawing to the backing buffer

copyBackBuffer

void copyBackBuffer()
Copies the back buffer to the onscreen or "front" buffer. Throws UnsupportedOperationException if isBackBufferSupported() returns false.


isDisplayListSupported

boolean isDisplayListSupported()

displayListFor

int displayListFor(long key)

startDisplayList

int startDisplayList(long key)

displayListFor

int displayListFor(java.lang.Object key)

startDisplayList

int startDisplayList(java.lang.Object key)

endDisplayList

void endDisplayList()

removeDisplayList

void removeDisplayList(int displayListID)

drawDisplayList

void drawDisplayList(int displayListID)

pushName

void pushName(int i)

popName

void popName()