public interface ISymbol extends org.gvsig.tools.persistence.Persistent, IPrintable, org.gvsig.tools.lang.Cloneable
Modifier and Type | Field and Description |
---|---|
static java.awt.Color |
SELECTION_COLOR |
Modifier and Type | Method and Description |
---|---|
void |
draw(java.awt.Graphics2D g,
java.awt.geom.AffineTransform affineTransform,
org.gvsig.fmap.geom.Geometry geom,
org.gvsig.fmap.dal.feature.Feature f,
org.gvsig.tools.task.Cancellable cancel)
Used when a symbol is going to be drawn.The method to do
it will depend on the derived version of the symbol.
|
void |
drawInsideRectangle(java.awt.Graphics2D g,
java.awt.geom.AffineTransform scaleInstance,
java.awt.Rectangle r,
org.gvsig.compat.print.PrintAttributes properties)
Useful to render the symbol inside the TOC, or inside little
rectangles.
|
java.awt.Color |
getColor()
Returns the
Color to use to render the symbol. |
java.lang.String |
getDescription()
The description is a human-readable text used to label it when show in a symbol menu or something like that.
|
int |
getOnePointRgb()
Returns the rgb of the symbol when it is drawn like a point.
|
void |
getPixExtentPlus(org.gvsig.fmap.geom.Geometry geom,
float[] distances,
ViewPort viewPort,
int dpi)
Returns the distance between the shape's bounding box and the
symbol-that-represents-this-shape's bounding box in a two-length-float
array passed as parameter.
|
ISymbol |
getSymbolForSelection()
Returns the derived version of the symbol that will be used to draw the
feature when it is selected.
|
int |
getSymbolType()
The use of this method -and its mechanism- is being valorated.
|
boolean |
isOneDotOrPixel(org.gvsig.fmap.geom.Geometry geom,
double[] positionOfDotOrPixel,
ViewPort viewPort,
int dpi)
Informs that the geometry will be represented with that symbol in just one pixel or dot
|
boolean |
isShapeVisible()
Tells whether the shape of the symbol will be drawn or not.
|
boolean |
isSuitableFor(org.gvsig.fmap.geom.Geometry geom)
True if this symbol is ok for the geometry.
|
void |
setColor(java.awt.Color color)
Sets the
Color to use to render the symbol. |
void |
setDescription(java.lang.String desc)
Sets the description of this symbol
|
print
void draw(java.awt.Graphics2D g, java.awt.geom.AffineTransform affineTransform, org.gvsig.fmap.geom.Geometry geom, org.gvsig.fmap.dal.feature.Feature f, org.gvsig.tools.task.Cancellable cancel)
g
- affineTransform
- shp
- cancel
- TODOvoid drawInsideRectangle(java.awt.Graphics2D g, java.awt.geom.AffineTransform scaleInstance, java.awt.Rectangle r, org.gvsig.compat.print.PrintAttributes properties) throws SymbolDrawingException
scaleInstance
- r
- properties
- TODOg2
- SymbolDrawingException
- TODOjava.awt.Color getColor()
Color
to use to render the symbol.
- Color
to use to render the symboljava.lang.String getDescription()
int getOnePointRgb()
void getPixExtentPlus(org.gvsig.fmap.geom.Geometry geom, float[] distances, ViewPort viewPort, int dpi)
Returns the distance between the shape's bounding box and the
symbol-that-represents-this-shape's bounding box in a two-length-float
array passed as parameter.
After this method returns, the float array passed will contain two values
representing the amount of pixels separating each of the X (first element)
and Y (second element) axes.
This distance maybe dependent on:
And in any other case, if the unit of the symbol is pixels or the symbol is not even an instance of CartographicSupport, the returning values are only defined by the symbol and are not calculated.
ViewPort
- viewPortShape
- shpint
- dpifloat[]
- distances, the array of floats where to store the distances in x and y axisISymbol getSymbolForSelection()
int getSymbolType()
boolean isOneDotOrPixel(org.gvsig.fmap.geom.Geometry geom, double[] positionOfDotOrPixel, ViewPort viewPort, int dpi)
geom
- positionOfDotOrPixel
- (out) filled with pixel or dot locationviewPort
- dpi
- boolean isShapeVisible()
boolean isSuitableFor(org.gvsig.fmap.geom.Geometry geom)
geom
- void setColor(java.awt.Color color)
Color
to use to render the symbol.color
- to render the symbolvoid setDescription(java.lang.String desc)
desc,
- a string with the descriptionISymbol.getDescription();
Copyright © 2013 gvSIG Association. All rights reserved.