|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.bbn.openmap.omGraphics.geom.BasicGeometry | +--com.bbn.openmap.omGraphics.OMGraphic | +--com.bbn.openmap.layer.mif.OMSubtraction
Defines a Region of a MIF file where when one region encloses another the enclosed region is subtracted from the enclosing region in order to create a hole Computationally this can be expensive to do on a complex layout like a streetmap of city
Field Summary |
Fields inherited from class com.bbn.openmap.omGraphics.OMGraphic |
declutterType, displayPaint, edgeMatchesFill, fillPaint, hasLabel, linePaint, matted, mattingPaint, renderType, selected, selectPaint, showEditablePalette, stroke, textureMask |
Fields inherited from class com.bbn.openmap.omGraphics.geom.BasicGeometry |
APP_OBJECT_KEY, appObject, ATT_MAP_KEY, lineType, needToRegenerate, shape, visible |
Constructor Summary | |
OMSubtraction(float[] lat,
float[] lon)
|
Method Summary | |
float |
distance(int x,
int y)
Return the shortest distance from the line to an XY-point - not relevant to this class. |
boolean |
generate(Projection proj)
Prepare the graphic for rendering. |
void |
render(java.awt.Graphics g)
Paint the graphic. |
Methods inherited from class com.bbn.openmap.omGraphics.geom.BasicGeometry |
_distance, appendShapeEdge, appendShapeEdge, appendShapeEdge, appendShapeEdge, checkAttributeMap, checkAttributeMap, clearAttributes, contains, createAttributeMap, createBoxShape, createShape, createShape, describeShapeDetail, describeShapeDetail, distanceToEdge, draw, fill, getAppObject, getAppObject, getAttribute, getAttributeMap, getAttributes, getLineType, getNeedToRegenerate, getShape, isRenderable, isVisible, putAttribute, removeAttribute, replaceAppObjectWithAttributeMap, setAppObject, setAppObject, setAttributes, setLineType, setNeedToRegenerate, setVisible |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.bbn.openmap.omGraphics.OMGeometry |
clearAttributes, contains, draw, fill, getAppObject, getAttribute, getAttributes, getLineType, getNeedToRegenerate, getShape, isRenderable, isVisible, putAttribute, removeAttribute, setAppObject, setAttributes, setLineType, setNeedToRegenerate, setVisible |
Constructor Detail |
public OMSubtraction(float[] lat, float[] lon)
Method Detail |
public boolean generate(Projection proj)
OMGraphic
render()
! If a vector graphic has
lat-lon components, then we project these vertices into x-y
space. For raster graphics we prepare in a different fashion.
If the generate is unsuccessful, it's usually because of some
oversight, (for instance if proj
is null), and
if debugging is enabled, a message may be output to the
controlling terminal.
generate
in interface OMGeometry
generate
in class OMGraphic
proj
- Projection
OMGraphic.regenerate(com.bbn.openmap.proj.Projection)
public void render(java.awt.Graphics g)
OMGraphic
paint()
function of
java.awt.Components. Note that if the graphic has not been
generated, it will not be rendered.
This method used to be abstract, but with the conversion of OMGraphics to internally represent themselves as java.awt.Shape objects, it's a more generic method. If the OMGraphic hasn't been updated to use Shape objects, it should have its own render method.
render
in class OMGraphic
g
- Graphics2D context to render into.public float distance(int x, int y)
distance
in interface OMGeometry
distance
in class OMGraphic
x
- X coordinate of the point.y
- Y coordinate fo the point.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |