ColorLibrary colors = context.getStyleLibrary().getColorSet(StyleLibrary.PLOT);
if(tree != null) {
E root = tree.getRootEntry();
for(int i = 0; i < tree.getHeight(); i++) {
CSSClass cls = new CSSClass(this, INDEX + i);
// Relative depth of this level. 1.0 = toplevel
final double relDepth = 1. - (((double) i) / tree.getHeight());
if(fill) {
cls.setStatement(SVGConstants.CSS_STROKE_PROPERTY, colors.getColor(i));
cls.setStatement(SVGConstants.CSS_STROKE_WIDTH_PROPERTY, relDepth * context.getStyleLibrary().getLineWidth(StyleLibrary.PLOT));
cls.setStatement(SVGConstants.CSS_FILL_PROPERTY, colors.getColor(i));
cls.setStatement(SVGConstants.CSS_FILL_OPACITY_PROPERTY, 0.1 / (projdim - 1));
}
else {
cls.setStatement(SVGConstants.CSS_STROKE_PROPERTY, colors.getColor(i));
cls.setStatement(SVGConstants.CSS_STROKE_WIDTH_PROPERTY, relDepth * context.getStyleLibrary().getLineWidth(StyleLibrary.PLOT));
cls.setStatement(SVGConstants.CSS_FILL_PROPERTY, SVGConstants.CSS_NONE_VALUE);
}
cls.setStatement(SVGConstants.CSS_STROKE_LINECAP_PROPERTY, SVGConstants.CSS_ROUND_VALUE);
cls.setStatement(SVGConstants.CSS_STROKE_LINEJOIN_PROPERTY, SVGConstants.CSS_ROUND_VALUE);
svgp.addCSSClassOrLogError(cls);
}
visualizeRTreeEntry(svgp, layer, proj, tree, root, 0);
}
}