Christian Dubray ha scritto:
> Thanks for you help.
>
> Here the reduced code, where the fault still exists.
> I´ve changed some attributes, but there is always the same problem. The
> labels are filtered out in paintPointLabelInternal(...) of LabelCacheImpl.
> displayArea.contains(transformed) returns false.
>
> AnchorPoint ap = styleFactory.createAnchorPoint(filterFactory.literal(0.5),
> filterFactory.literal(0.0));
> Displacement dp = styleFactory.createDisplacement(filterFactory.literal(0.0),
> filterFactory.literal(-20.0));
> LabelPlacement placement = styleFactory.createPointPlacement(ap, dp,
> filterFactory.literal(0.0));
> Fill bgFill = styleFactory.createFill(filterFactory.literal(bgColor),
> filterFactory.literal(1));
> Stroke stroke = styleFactory.createStroke(filterFactory.literal(Color.black),
> filterFactory.literal(1.0), filterFactory.literal(1.0f));
> Fill fillBg = styleFactory.createFill(filterFactory.literal(bgColor),
> filterFactory.literal(1.0));
> Graphic graphicBg = styleFactory.createGraphic(null, new Mark[]
> {StyleFactoryFinder.createStyleFactory().getCrossMark()}, null, null,
> filterFactory.literal(20), filterFactory
> TextSymbolizer2 textSymbolizer = (TextSymbolizer2)
> styleFactory.createTextSymbolizer(fill, new Font[] {gtFont}, null,
> filterFactory.literal("This is a test"), placement, null);
> textSymbolizer.setGeometryPropertyName("geometry");
> textSymbolizer.setGraphic(graphicBg);
>
> As I said, to the right side all works correct. Only the left side makes the
> problems. Depending on the length of the label, the label is hided earlier
> although there would be enough place to show it. But the label-bounds seem to
> be calculated correct.
Sorry, can't use the above.
I will be pleased to have a look if, as said before, you provide
me with "a data set and a little self
contained program that shows the behaviour you deem to be unsatisfactory".
That means a full runnable java file with a main that will
draw a map showing the issue along with the data set
that makes the problem occur.
I don't have time to replicate the issue by myself.
Cheers
Andrea
--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.
------------------------------------------------------------------------------
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users