double w = width - 1;
double h = height - 1;
// must cram symbol in icon space, so rescale if too big !
// metabuffer is a good way to judge the size...
MetaBufferEstimator estimator = new MetaBufferEstimator();
estimator.visit(symbolizer);
double estimatedSize = estimator.getBuffer();
Symbolizer rescaled = symbolizer;
if (estimatedSize > w || estimatedSize > h) {
// rescale necessary
double scale = Math.min(w, h) / estimatedSize;