void render( PointStyling styling, double x, double y ) {
Point2D.Double p = (Point2D.Double) worldToScreen.transform( new Point2D.Double( x, y ), null );
x = p.x;
y = p.y;
Graphic g = styling.graphic;
Rectangle2D.Double rect = rendererContext.fillRenderer.getGraphicBounds( g, x, y, styling.uom );
if ( g.image == null && g.imageURL == null ) {
renderMark( g.mark, g.size < 0 ? 6
: round( rendererContext.uomCalculator.considerUOM( g.size, styling.uom ) ),
styling.uom, rendererContext, rect.getMinX(), rect.getMinY(), g.rotation );
return;
}
BufferedImage img = g.image;
if ( img == null && g.imageURL != null ) {
img = rendererContext.svgRenderer.prepareSvg( rect, g );
}
if ( img != null ) {
AffineTransform t = rendererContext.graphics.getTransform();
if ( !isZero( g.rotation ) ) {
int rotationPointX = round( rect.x + rect.getWidth() * g.anchorPointX );
int rotationPointY = round( rect.y + rect.getHeight() * g.anchorPointY );
rendererContext.graphics.rotate( toRadians( g.rotation ), rotationPointX, rotationPointY );
}
rendererContext.graphics.drawImage( img, round( rect.x ), round( rect.y ), round( rect.width ),
round( rect.height ), null );
rendererContext.graphics.setTransform( t );
}
}