* rendered with the specified styles
*
*/
private int getExpandSizeFromStyle( Style style ) {
MetaBufferEstimator rbe = new MetaBufferEstimator();
FeatureTypeStyle[] styles = style.getFeatureTypeStyles();
for (int t=0; t<styles.length; t++) {
final FeatureTypeStyle lfts = styles[t];
Rule[] rules = lfts.getRules();
for (int j = 0; j < rules.length; j++) {
rbe.visit(rules[j]);
}
}
if(!rbe.isEstimateAccurate())
RendererPlugin.log("Assuming rendering buffer = " + rbe.getBuffer()
+ ", but estimation is not accurate, you may want to set a buffer manually", null);
// the actual amount we have to grow the rendering area by is half of the stroke/symbol sizes
// plus one extra pixel for antialiasing effects
return (int) Math.round(rbe.getBuffer() / 2.0 + 1);
}