shp_renderer.geometry
Class SHPPolyline

java.lang.Object
  extended by shp_renderer.geometry.SHPShape
      extended by shp_renderer.geometry.SHPPolyType
          extended by shp_renderer.geometry.SHPPolyline

public class SHPPolyline
extends SHPPolyType

SHPPolyline - This class is used to represent a shapefile polyline type, which means it stores a series of polylines, called parts. Note that this is commonly used for rendering roads in a map.

Author:
Richard McKenna

Constructor Summary
SHPPolyline(double[] initBoundingBox, int initNumBytes, int initNumParts, int initNumPoints, int[] initParts, double[] initXPointsData, double[] initYPointsData)
          This constructor fully initialize the object for use.
 
Method Summary
 void render(java.awt.Graphics2D g2, double zoomScale, double viewportCenterX, double viewportCenterY, int panelWidth, int panelHeight)
          This renders the polyine, including all lines within.
 
Methods inherited from class shp_renderer.geometry.SHPPolyType
addBytes, calculateSize, fillData, getBoundingBox, getNumBytes, getNumParts, getNumPoints, getParts, getXPointsData, getXRenderData, getYPointsData, getYRenderData
 
Methods inherited from class shp_renderer.geometry.SHPShape
getFillColor, getLineColor, getRecordLength, getRecordNumber, setFillColor, setLineColor, setRecordLength, setRecordNumber
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SHPPolyline

public SHPPolyline(double[] initBoundingBox,
                   int initNumBytes,
                   int initNumParts,
                   int initNumPoints,
                   int[] initParts,
                   double[] initXPointsData,
                   double[] initYPointsData)
This constructor fully initialize the object for use.

Parameters:
initBoundingBox - The bounding box for the polygon.
initNumBytes - The number of bytes.
initNumParts - The number of parts.
initNumPoints - The number of points.
initParts - The Parts.
initXPointsData - The x point data.
initYPointsData - The y point data.
Method Detail

render

public void render(java.awt.Graphics2D g2,
                   double zoomScale,
                   double viewportCenterX,
                   double viewportCenterY,
                   int panelWidth,
                   int panelHeight)
This renders the polyine, including all lines within.

Specified by:
render in class SHPShape
Parameters:
g2 - The graphics used for rendering.
zoomScale - The level of zoom.
viewportCenterX - The viewport center x.
viewportCenterY - The viewport center y.
panelWidth - The width of the panel.
panelHeight - The height of the panel.