public Java2DRenderer( Graphics2D graphics, int width, int height, Envelope bbox ) {
this.graphics = graphics;
this.width = width;
if ( bbox != null ) {
Pair<Envelope, DoublePair> p = RenderHelper.getWorldToScreenTransform( worldToScreen, bbox, width, height );
double scalex = p.second.first;
double scaley = p.second.second;
bbox = p.first;
res = calculateResolution( bbox, width );
LOG.debug( "For coordinate transformations, scaling by x = {} and y = {}", scalex, -scaley );
LOG.trace( "Final transformation was {}", worldToScreen );
} else {
LOG.warn( "No envelope given, proceeding with a scale of 1." );
}
initRenderers( bbox );
}