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!
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
TextStyle2D
public TextStyle2D()
TextStyle2D
public TextStyle2D(TextStyle2D t)
getAnchorX
public double getAnchorX()
getAnchorY
public double getAnchorY()
getFont
public java.awt.Font getFont()
getHaloComposite
public java.awt.Composite getHaloComposite()
getHaloFill
public java.awt.Paint getHaloFill()
getHaloRadius
public float getHaloRadius()
getRotation
public double getRotation()
getTextGlyphVector
public java.awt.font.GlyphVector getTextGlyphVector(java.awt.Graphics2D graphics)
- recompute each time
getHaloShape
public java.awt.Shape getHaloShape(java.awt.Graphics2D graphics)
setAnchorX
public void setAnchorX(double f)
- Parameters:
f
-
setAnchorY
public void setAnchorY(double f)
- Parameters:
f
-
setFont
public void setFont(java.awt.Font font)
- Parameters:
font
-
setHaloComposite
public void setHaloComposite(java.awt.Composite composite)
- Parameters:
composite
-
setHaloFill
public void setHaloFill(java.awt.Paint paint)
- Parameters:
paint
-
setHaloRadius
public void setHaloRadius(float f)
- Parameters:
f
-
setRotation
public void setRotation(double f)
- Parameters:
f
-
getLabel
public java.lang.String getLabel()
- Returns:
- Returns the label.
setLabel
public void setLabel(java.lang.String label)
- Parameters:
label
- The label to set.
isPointPlacement
public boolean isPointPlacement()
- Returns:
- Returns the pointPlacement (true => point placement, false => line placement)
setPointPlacement
public void setPointPlacement(boolean pointPlacement)
- Parameters:
pointPlacement
- (true => point placement, false => line placement.)
getDisplacementX
public double getDisplacementX()
- Returns:
- Returns the displacementX.
setDisplacementX
public void setDisplacementX(double displacementX)
- Parameters:
displacementX
- The displacementX to set.
getDisplacementY
public double getDisplacementY()
- Returns:
- Returns the displacementY.
setDisplacementY
public void setDisplacementY(double displacementY)
- Parameters:
displacementY
- The displacementY to set.
getFill
public java.awt.Paint getFill()
- Getter for property fill.
- Returns:
- Value of property fill.
setFill
public void setFill(java.awt.Paint fill)
- Setter for property fill.
- Parameters:
fill
- New value of property fill.
setPerpendicularOffset
public void setPerpendicularOffset(int displace)
- only valid for a isPointPlacement=false (ie. a lineplacement)
- Parameters:
displace
- in pixels
getPerpendicularOffset
public int getPerpendicularOffset()
- only valid for a isPointPlacement=false (ie. a lineplacement)
- Returns:
- displacement in pixels
getComposite
public java.awt.Composite getComposite()
- Getter for property composite.
- Returns:
- Value of property composite.
setComposite
public void setComposite(java.awt.Composite composite)
- Setter for property composite.
- Parameters:
composite
- New value of property composite.
toString
public java.lang.String toString()
- Returns a string representation of this style.
- Overrides:
toString
in class java.lang.Object
setGraphic
public void setGraphic(Style2D s)
- Sets the style2D to be drawn underneath this text
getGraphic
public Style2D getGraphic()
- gets the Style2D to be drawn underneath this text
getGraphicDimensions
public java.awt.Rectangle getGraphicDimensions()
Copyright © 1996-2010 Geotools. All Rights Reserved.