}
@Override
public void paintViews(final Graphics2D g, final boolean withZoom, final boolean withGrid) {
final IViewShape temp = getTempView();
final double zoomValue = getZoom();
final boolean mustZoom = withZoom && !LNumber.equalsDouble(zoomValue, 1.);
g.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION, alphaInterpolValue);
g.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, colorRenderingValue);
g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, antiAliasingValue);
g.setRenderingHint(RenderingHints.KEY_RENDERING, renderingValue);
// Displaying the magnetic grid.
if(withGrid && magneticGrid.isGridDisplayed())
magneticGrid.paint(g);
g.translate(ORIGIN.getX(), ORIGIN.getY());
if(mustZoom)
g.scale(zoomValue, zoomValue);
page.paint(g, ShapeFactory.createPoint());
// Getting the clip must be done here to consider the scaling and translation.
final Rectangle clip = g.getClipBounds();
synchronized(views){
for(final IViewShape view : views)
view.paint(g, clip);
}
if(temp!=null)
temp.paint(g, clip);
if(userSelectionBorder!=null) {
g.setStroke(STROKE_USER_SELECTION_BORDER);
g.setColor(Color.GRAY);
g.draw(userSelectionBorder);