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()
getAnchorX
public double getAnchorX()
- Returns:
getAnchorY
public double getAnchorY()
- Returns:
getFont
public java.awt.Font getFont()
- Returns:
getHaloComposite
public java.awt.Composite getHaloComposite()
- Returns:
getHaloFill
public java.awt.Paint getHaloFill()
- Returns:
getHaloRadius
public float getHaloRadius()
- Returns:
getRotation
public double getRotation()
- Returns:
getTextGlyphVector
public java.awt.font.GlyphVector getTextGlyphVector(java.awt.Graphics2D graphics)
- Returns:
getHaloShape
public java.awt.Shape getHaloShape(java.awt.Graphics2D graphics)
- Returns:
setAnchorX
public void setAnchorX(double f)
setAnchorY
public void setAnchorY(double 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.
Copyright © GeoTools. All Rights Reserved.