org.free.garminimg.utils
Class LabelDeClutteringFilter

java.lang.Object
  extended by org.free.garminimg.utils.LabelDeClutteringFilter

public class LabelDeClutteringFilter
extends java.lang.Object

Sort the labels by importance for latter drawing.


Constructor Summary
LabelDeClutteringFilter(java.awt.Graphics2D g2, float fontSize, java.awt.Paint frontColor, java.awt.Paint backgroundColor)
           
 
Method Summary
 void addLineLabel(int[] xPoints, int[] yPoints, int nbPoints, Label label, int priority)
          Will try to put the label attached to one of the segments of the given line
 void addPointLabel(int x, int y, int width, int height, Label label, int priority)
          Will try to put the label horizontally around the point
 void addSurfaceLabel(int[] xPoints, int[] yPoints, int nbPoints, Label label, int priority)
          will try to put the label horizontaly within the given surface
 void paint()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LabelDeClutteringFilter

public LabelDeClutteringFilter(java.awt.Graphics2D g2,
                               float fontSize,
                               java.awt.Paint frontColor,
                               java.awt.Paint backgroundColor)
Method Detail

addPointLabel

public void addPointLabel(int x,
                          int y,
                          int width,
                          int height,
                          Label label,
                          int priority)
Will try to put the label horizontally around the point


addLineLabel

public void addLineLabel(int[] xPoints,
                         int[] yPoints,
                         int nbPoints,
                         Label label,
                         int priority)
Will try to put the label attached to one of the segments of the given line


addSurfaceLabel

public void addSurfaceLabel(int[] xPoints,
                            int[] yPoints,
                            int nbPoints,
                            Label label,
                            int priority)
will try to put the label horizontaly within the given surface


paint

public void paint()


Copyright © 2008. All Rights Reserved.