if(dpi != standardDpi) {
double scaleFactor = dpi / standardDpi;
w = (int) Math.round(w * scaleFactor);
h = (int) Math.round(h * scaleFactor);
DpiRescaleStyleVisitor dpiVisitor = new DpiRescaleStyleVisitor(scaleFactor);
dpiVisitor.visit(gt2Style);
gt2Style = (Style) dpiVisitor.getCopy();
}
// apply UOM rescaling if we have a scale
if (request.getScale() > 0) {
double pixelsPerMeters = RendererUtilities.calculatePixelsPerMeterRatio(request.getScale(), request.getLegendOptions());