Revision 11009 trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/rendering/styling/PointPlacementConstraints.java
PointPlacementConstraints.java | ||
---|---|---|
43 | 43 |
* |
44 | 44 |
* $Id$ |
45 | 45 |
* $Log$ |
46 |
* Revision 1.2 2007-03-09 08:33:43 jaume |
|
46 |
* Revision 1.3 2007-04-02 16:34:56 jaume |
|
47 |
* Styled labeling (start commiting) |
|
48 |
* |
|
49 |
* Revision 1.2 2007/03/09 08:33:43 jaume |
|
47 | 50 |
* *** empty log message *** |
48 | 51 |
* |
49 | 52 |
* Revision 1.1.2.1 2007/02/21 07:34:08 jaume |
... | ... | |
53 | 56 |
*/ |
54 | 57 |
package com.iver.cit.gvsig.fmap.rendering.styling; |
55 | 58 |
|
59 |
import java.awt.geom.AffineTransform; |
|
60 |
|
|
56 | 61 |
import org.cresques.px.gml.MultiPolygon; |
57 | 62 |
|
63 |
import com.iver.cit.gvsig.fmap.core.FPoint2D; |
|
58 | 64 |
import com.iver.cit.gvsig.fmap.core.FShape; |
59 | 65 |
import com.iver.cit.gvsig.fmap.core.IGeometry; |
60 |
import com.iver.cit.gvsig.fmap.core.symbols.ITextSymbol; |
|
61 | 66 |
|
62 | 67 |
public class PointPlacementConstraints extends AbstractPlacementConstraints { |
63 | 68 |
|
64 |
public FShape[] getLocationsFor(IGeometry geom, ITextSymbol label,
|
|
65 |
MultiPolygon exclusionZone) {
|
|
66 |
// TODO Implement it
|
|
67 |
throw new Error("Not yet implemented!");
|
|
68 |
|
|
69 |
public FShape[] getLocationsFor(IGeometry geom, FShape labelShape, MultiPolygon exclusionZone) {
|
|
70 |
FPoint2D p = (FPoint2D) geom.getInternalShape();
|
|
71 |
FShape myShape = labelShape.cloneFShape();
|
|
72 |
myShape.transform(AffineTransform.getTranslateInstance(p.getX(), p.getY()));
|
|
73 |
return new FShape[] { myShape }; |
|
69 | 74 |
} |
70 | 75 |
|
71 | 76 |
} |
Also available in: Unified diff