Okay I figured the transparent point without a filter via a simple example.
>From what I can see whether Color.OPAQUE or Color.TRANSLUCENT is used does
not make a difference.
What I was missing was the Opacity setting for my setFill. So I was getting
1 pixel.
You will also notice I reduced my lines for this by 2 by combining Opacity
in the setStroke and setFill parameter pass.
Defined the following class variables:
private static StyleFactory styleFactory =
CommonFactoryFinder.getStyleFactory(null);
private static FilterFactory filterFactory =
CommonFactoryFinder.getFilterFactory(null);
private static Rule rule = styleFactory.createRule();
private static Graphic graphic = styleFactory.createDefaultGraphic();
private static Mark circleMark = styleFactory.getCircleMark();
private static PointSymbolizer pointSymbolizer;
private static FeatureTypeStyle featureTypeStyle;
private static Style style = styleFactory.createStyle();
Defined My Transparent Point:
circleMark.setStroke(styleFactory.createStroke(
filterFactory.literal(Color.TRANSLUCENT),
filterFactory.literal(1),filterFactory.literal(0.0))); //color not impact so
much, width needs to be 1, opacity 100% translucent at 0
circleMark.setFill(styleFactory.createFill(filterFactory.literal(Color.TRANSLUCENT),
filterFactory.literal(0.0))); //color not impact so much, opacity 100%
translucent at 0
graphic.graphicalSymbols().clear();
graphic.graphicalSymbols().add(circleMark); //will bomb out if no
mark
set for graphic
graphic.setSize(filterFactory.literal(1)); //size defaults to
~20px if
not around
graphic.setOpacity(filterFactory.literal(0.0)); //transparent 100%
pointSymbolizer = styleFactory.createPointSymbolizer(graphic, null);
rule.symbolizers().add(0,pointSymbolizer);
featureTypeStyle = styleFactory.createFeatureTypeStyle(new
Rule[]{rule});
style.featureTypeStyles().add(featureTypeStyle);
--
View this message in context:
http://n2.nabble.com/ugh-Transparent-Point-tp4509289p4542697.html
Sent from the geotools-gt2-users mailing list archive at Nabble.com.
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users