public class OMScalingIcon extends OMScalingRaster implements java.io.Serializable
OMScalingRaster
,
Serialized FormOMRasterObject.TrimScaleFilter
Modifier and Type | Field and Description |
---|---|
protected float |
baseScale |
protected float |
maxScale |
protected float |
minScale |
clipRect, corners, lastProjection, lat2, lon2, scaleTransformType, sourceImage
colors, transparent
bitmap, bits, colorModel, COLORMODEL_DIRECT, COLORMODEL_IMAGEICON, COLORMODEL_INDEXED, DEBUG, FAST_SCALING, filteredHeight, filteredWidth, height, imageFilter, lat, logger, lon, needToReposition, pixels, point1, point2, rotationAngle, SMOOTH_SCALING, width, x, y
declutterType, displayPaint, edgeMatchesFill, fillPaint, hasLabel, linePaint, matted, mattingPaint, renderType, selected, selectPaint, showEditablePalette, stroke, textureMask
APP_OBJECT_KEY, appObject, ATT_MAP_KEY, lineType, needToRegenerate, shape, visible
ADD_GRAPHIC_MASK, BASIC_STROKE, CHANGE_APPEARANCE, clear, DECIMAL_DEGREES, DECLUTTERTYPE_LINE, DECLUTTERTYPE_MOVE, DECLUTTERTYPE_NONE, DECLUTTERTYPE_SPACE, DEFAULT_ROTATIONANGLE, DELETE_GRAPHIC_MASK, DESELECT_GRAPHIC_MASK, DESELECTALL_GRAPHIC_MASK, GRAPHICTYPE_ARC, GRAPHICTYPE_BITMAP, GRAPHICTYPE_CIRCLE, GRAPHICTYPE_ELLIPSE, GRAPHICTYPE_GRAPHIC, GRAPHICTYPE_GRID, GRAPHICTYPE_LINE, GRAPHICTYPE_POINT, GRAPHICTYPE_POLY, GRAPHICTYPE_RASTER, GRAPHICTYPE_RECTANGLE, GRAPHICTYPE_TEXT, INFOLINE, LABEL, LINETYPE_GREATCIRCLE, LINETYPE_RHUMB, LINETYPE_STRAIGHT, LINETYPE_UNKNOWN, LOWER_GRAPHIC_MASK, LOWER_TO_BOTTOM_GRAPHIC_MASK, OMGRAPHIC_ELT, OMGRAPHIC_TYPE_ATTR, RADIANS, RAISE_GRAPHIC_MASK, RAISE_TO_TOP_GRAPHIC_MASK, REMOVABLE, RENDERTYPE_LATLON, RENDERTYPE_OFFSET, RENDERTYPE_UNKNOWN, RENDERTYPE_XY, SELECT_GRAPHIC_MASK, SORT_GRAPHICS_MASK, TOOLTIP, UPDATE_GRAPHIC_MASK, UPDATED
Constructor and Description |
---|
OMScalingIcon()
Construct a blank OMRaster, to be filled in with set calls.
|
OMScalingIcon(double centerLat,
double centerLon,
java.awt.Image image)
Create an OMRaster, Lat/Lon placement with an ImageIcon.
|
OMScalingIcon(double centerLat,
double centerLon,
javax.swing.ImageIcon ii)
Create an OMRaster, Lat/Lon placement with an ImageIcon.
|
OMScalingIcon(double centerLat,
double centerLon,
int offsetX,
int offsetY,
java.awt.Image ii,
float baseScale)
Create an OMRaster, Lat/Lon placement with an Image.
|
OMScalingIcon(double centerLat,
double centerLon,
int offsetX,
int offsetY,
javax.swing.ImageIcon ii,
float baseScale)
Create an OMRaster, Lat/Lon placement with an ImageIcon.
|
OMScalingIcon(double centerLat,
double centerLon,
int offsetX,
int offsetY,
int w,
int h,
int[] pix,
float baseScale)
Creates an OMRaster images, Lat/Lon placement with a direct colormodel
image.
|
OMScalingIcon(float centerLat,
float centerLon,
int offsetX,
int offsetY,
int w,
int h,
byte[] bytes,
java.awt.Color[] colorTable,
int trans,
float baseScale)
Lat/Lon placement with a indexed colormodel, which is using a colortable
and a byte array to construct the int[] pixels.
|
Modifier and Type | Method and Description |
---|---|
float |
getBaseScale() |
float |
getMaxScale() |
float |
getMinScale() |
boolean |
isOnMap(Projection proj) |
protected boolean |
position(Projection proj)
Since the image doesn't necessarily need to be regenerated when it is
merely moved, raster objects have this function, called from generate()
and when a placement attribute is changed.
|
void |
restore(OMGeometry source)
Takes the generic OMGraphic settings from another OMGraphic and pushes
them to this one.
|
protected void |
scaleTo(Projection thisProj)
Overridding this so we don't clip rotated icons near the edge of the map.
|
void |
setBaseScale(float bs) |
void |
setMaxScale(float ms)
Set the scale that limits how small an icon will shrink.
|
void |
setMinScale(float ms)
Set the scale that limits how big an icon should grow.
|
generate, getClippedRectangle, getImageWarp, getLRLat, getLRLon, getScaleTransformType, getULLat, getULLon, render, rotate, setImage, setLRLat, setLRLon, setScaleTransformType, setShape, setULLat, setULLon, updateImageForProjection
computePixels, getBitmapFromInternalData, getByte, getColors, getPixel, getTransparent, setBits, setByte, setColors, setColors, setImageIcon, setPixel, setTransparent
filterImage, getBits, getColorModel, getFilteredHeight, getFilteredWidth, getHeight, getImage, getImageFilter, getLat, getLon, getMapLocation, getNeedToReposition, getPixels, getRotationAngle, getWidth, getX, getY, hasLineTypeChoice, imageUpdate, scaleTo, setColorModel, setHeight, setImageFilter, setLat, setLon, setNeedToReposition, setPixels, setRotationAngle, setWidth, setX, setY, shouldRenderFill
clone, deselect, distance, getDeclutterType, getDisplayColor, getDisplayPaint, getEdgeMatchesFill, getFillColor, getFillPaint, getHasLabel, getLineColor, getLinePaint, getMattingPaint, getRenderType, getSelectColor, getSelectPaint, getShowEditablePalette, getStroke, getTextureMask, initLabelingDuringGenerate, isClear, isMatted, isSelected, normalizeDistanceForLineWidth, readStroke, regenerate, renderLabel, select, setDeclutterType, setEdgeMatchesFill, setFillColor, setFillPaint, setGraphicsColor, setGraphicsForEdge, setGraphicsForFill, setHasLabel, setLabelLocation, setLabelLocation, setLabelLocation, setLabelLocation, setLineColor, setLinePaint, setMatted, setMattingPaint, setRenderType, setSelectColor, setSelected, setSelectPaint, setShape, setShowEditablePalette, setStroke, setTextureMask, shouldRenderEdge, writeStroke
_distance, appendShapeEdge, appendShapeEdge, appendShapeEdge, appendShapeEdge, checkAttributeMap, checkAttributeMap, clearAttributes, contains, createAttributeMap, createBoxShape, createShape, createShape, describeShapeDetail, describeShapeDetail, distanceToEdge, distanceToEdge, draw, fill, getAppObject, getAppObject, getAttribute, getAttributeMap, getAttributes, getDescription, getLineType, getNeedToRegenerate, getShape, isRenderable, isVisible, putAttribute, removeAttribute, replaceAppObjectWithAttributeMap, setAppObject, setAppObject, setAttributes, setLineType, setNeedToRegenerate, setVisible
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
clone, deselect, getDeclutterType, getDisplayColor, getDisplayPaint, getFillColor, getFillPaint, getLineColor, getLinePaint, getMattingPaint, getRenderType, getSelectColor, getSelectPaint, getShowEditablePalette, getStroke, getTextureMask, isMatted, isSelected, normalizeDistanceForLineWidth, regenerate, renderLabel, select, setDeclutterType, setFillPaint, setGraphicsColor, setGraphicsForEdge, setGraphicsForFill, setLabelLocation, setLabelLocation, setLabelLocation, setLinePaint, setMatted, setMattingPaint, setRenderType, setSelected, setSelectPaint, setShowEditablePalette, setStroke, setTextureMask, shouldRenderEdge
clearAttributes, contains, distance, distanceToEdge, draw, fill, getAppObject, getAttribute, getAttributes, getDescription, getLineType, getNeedToRegenerate, getShape, isRenderable, isVisible, putAttribute, removeAttribute, setAppObject, setAttributes, setLineType, setNeedToRegenerate, setShape, setVisible
protected float baseScale
protected float maxScale
protected float minScale
public OMScalingIcon()
public OMScalingIcon(double centerLat, double centerLon, int offsetX, int offsetY, int w, int h, int[] pix, float baseScale)
centerLat
- latitude of the top of the image.centerLon
- longitude of the left side of the image.offsetX
- horizontal pixel offset of icon (positive pushes east).offsetY
- vertical pixel offset of icon (positive pushes south).w
- width of the image, in pixels.h
- height of the image, in pixels.pix
- color values for the pixels.baseScale
- the scale where the icon will be show regular size.OMRaster.setPixel(int, int, int)
public OMScalingIcon(double centerLat, double centerLon, int offsetX, int offsetY, javax.swing.ImageIcon ii, float baseScale)
centerLat
- latitude of the top of the image.centerLon
- longitude of the left side of the image.offsetX
- horizontal pixel offset of icon (positive pushes east).offsetY
- vertical pixel offset of icon (positive pushes south).ii
- ImageIcon used for the image.baseScale
- the scale where the icon will be show regular size.public OMScalingIcon(double centerLat, double centerLon, javax.swing.ImageIcon ii)
centerLat
- latitude of the top of the image.centerLon
- longitude of the left side of the image.ii
- ImageIcon used for the image.public OMScalingIcon(double centerLat, double centerLon, int offsetX, int offsetY, java.awt.Image ii, float baseScale)
centerLat
- latitude of the top of the image.centerLon
- longitude of the left side of the image.offsetX
- horizontal pixel offset of icon (positive pushes east).offsetY
- vertical pixel offset of icon (positive pushes south).ii
- Image used for the image.baseScale
- the scale where the icon will be show regular size.public OMScalingIcon(double centerLat, double centerLon, java.awt.Image image)
centerLat
- latitude of the top of the image.centerLon
- longitude of the left side of the image.image
- ImageIcon used for the image.public OMScalingIcon(float centerLat, float centerLon, int offsetX, int offsetY, int w, int h, byte[] bytes, java.awt.Color[] colorTable, int trans, float baseScale)
centerLat
- latitude of the top of the image.centerLon
- longitude of the left side of the image.offsetX
- horizontal pixel offset of icon (positive pushes east).offsetY
- vertical pixel offset of icon (positive pushes south).w
- width of the image, in pixels.h
- height of the image, in pixels.bytes
- colortable index values for the pixels.colorTable
- color array corresponding to bytestrans
- transparency of image.baseScale
- the scale where the icon will be show regular size.OMRaster.setPixel(int, int, int)
protected boolean position(Projection proj)
position
in class OMScalingRaster
proj
- projection of window.public boolean isOnMap(Projection proj)
isOnMap
in class OMScalingRaster
protected void scaleTo(Projection thisProj)
scaleTo
in class OMScalingRaster
thisProj
- the projection that the image should be scaled to.public void setBaseScale(float bs)
public float getBaseScale()
public void setMaxScale(float ms)
public float getMaxScale()
public void setMinScale(float ms)
public float getMinScale()
public void restore(OMGeometry source)
OMGraphicAdapter
restore
in interface OMGeometry
restore
in class OMScalingRaster
Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details