public void renderScene(Dimension canvas, final Graphics2D graphics) 
    {
        final int screenWidth = canvas.width;
        final int screenHeight = canvas.height;
        
        final double xInc = screenWidth / (double) sceneWidth;
        final double yInc = screenHeight / (double) sceneHeight;

        final int xMax = (int) Math.floor( sceneWidth * xInc );
        final int yMax = (int) Math.floor( sceneHeight * yInc );

        graphics.setColor(Color.RED);

        if ( renderGrid ) 
        {
            // draw grid Y
            for ( int x = 0 ; x < sceneWidth ; x+=1) 
            {
                final int currentX=(int) Math.floor(x*xInc);
                graphics.drawLine( currentX, 0 , currentX, yMax);
            }
            
            // draw grid X
            for ( int y = 0 ; y < sceneHeight ; y+=1) 
            {
                final int currentY= (int) Math.floor(y*yInc);
                graphics.drawLine( 0, currentY , xMax  , currentY );
            }        
        }
        
        // draw grid
        final ISceneVisitor visitor = new ISceneVisitor() {
			
			@Override
			public void visit(int x, int y, byte cellStatus) 
			{
			    fillRect( x , y , xInc , yInc , graphics );
			}
		};
		scene.visitOccupiedCells( visitor );
        
        // draw markers
        synchronized( markers ) 
        {
            for ( List<Marker> list : markers.values() ) 
            {
                Color lastColor = null;
                for ( Marker m : list ) 
                {
                    if ( lastColor == null || ! lastColor.equals(m.color)) {
                        graphics.setColor( m.color );
                        lastColor = m.color;
                    }
                    if ( m.hasType(MarkerType.ENDPOINT ) ) {
                    	drawEndpoint( m.x , m.y , xInc ,yInc , graphics );
                    } else {
                    	fillRect( m.x , m.y , xInc , yInc , graphics );
                    }
                }
            }
        }
    }