| |
|
| java.lang.Object org.geotools.renderer.style.Style org.geotools.renderer.style.Style2D org.geotools.renderer.style.TextStyle2D
TextStyle2D | public class TextStyle2D extends Style2D (Code) | | DJB:
This class was fundamentally wrong - it tried to convert into .
Not only was it doing a really crappy job, but its fundamentally the wrong place to do it.
The SLD spec defines a as:
and as:
its annotated as:
A "PerpendicularOffset" gives the perpendicular distance away from a line to draw a label.
which is a bit vague, but there's a little more details here:
The PerpendicularOffset element of a LinePlacement gives the perpendicular distance away from a line to draw a label. ...
The distance is in pixels and is positive to the left-hand.
Left hand/right hand for perpendicularOffset is just crap - I'm assuming them mean +ive --> "up" and -ive --> "down".
See the actual label code for how it deals with this.
I've removed all the absoluteLineDisplacement stuff and replaced it with
isPointPlacement() (true) --> render normally (PointPlacement Attributes)
isPointPlacement() (false) --> render LinePlacement
This replaces the old behavior which converted a LinePlacement -> pointplacement and set the absoluteLineDisplacement flag!
|
displacementX | double displacementX(Code) | | |
displacementY | double displacementY(Code) | | |
haloRadius | float haloRadius(Code) | | |
perpendicularOffset | int perpendicularOffset(Code) | | |
pointPlacement | boolean pointPlacement(Code) | | yes = no = default = yes*
|
rotation | double rotation(Code) | | |
getAnchorX | public double getAnchorX()(Code) | | |
getAnchorY | public double getAnchorY()(Code) | | |
getComposite | public Composite getComposite()(Code) | | Getter for property composite.
Value of property composite. |
getDisplacementX | public double getDisplacementX()(Code) | | Returns the displacementX. |
getDisplacementY | public double getDisplacementY()(Code) | | Returns the displacementY. |
getFill | public Paint getFill()(Code) | | Getter for property fill.
Value of property fill. |
getGraphic | public Style2D getGraphic()(Code) | | gets the Style2D to be drawn underneath this text
|
getHaloRadius | public float getHaloRadius()(Code) | | |
getPerpendicularOffset | public int getPerpendicularOffset()(Code) | | only valid for a isPointPlacement=false (ie. a lineplacement)
displacement in pixels |
getRotation | public double getRotation()(Code) | | |
isPointPlacement | public boolean isPointPlacement()(Code) | | Returns the pointPlacement (true => point placement, false => line placement) |
setAnchorX | public void setAnchorX(double f)(Code) | | Parameters: f - |
setAnchorY | public void setAnchorY(double f)(Code) | | Parameters: f - |
setComposite | public void setComposite(Composite composite)(Code) | | Setter for property composite.
Parameters: composite - New value of property composite. |
setDisplacementX | public void setDisplacementX(double displacementX)(Code) | | Parameters: displacementX - The displacementX to set. |
setDisplacementY | public void setDisplacementY(double displacementY)(Code) | | Parameters: displacementY - The displacementY to set. |
setFill | public void setFill(Paint fill)(Code) | | Setter for property fill.
Parameters: fill - New value of property fill. |
setFont | public void setFont(Font font)(Code) | | Parameters: font - |
setGraphic | public void setGraphic(Style2D s)(Code) | | Sets the style2D to be drawn underneath this text
|
setHaloComposite | public void setHaloComposite(Composite composite)(Code) | | Parameters: composite - |
setHaloFill | public void setHaloFill(Paint paint)(Code) | | Parameters: paint - |
setHaloRadius | public void setHaloRadius(float f)(Code) | | Parameters: f - |
setLabel | public void setLabel(String label)(Code) | | Parameters: label - The label to set. |
setPerpendicularOffset | public void setPerpendicularOffset(int displace)(Code) | | only valid for a isPointPlacement=false (ie. a lineplacement)
Parameters: displace - in pixels |
setPointPlacement | public void setPointPlacement(boolean pointPlacement)(Code) | | Parameters: pointPlacement - (true => point placement, false => line placement.) |
setRotation | public void setRotation(double f)(Code) | | Parameters: f - |
toString | public String toString()(Code) | | Returns a string representation of this style.
|
|
|
|