nl.tudelft.simulation.dsol.animation.gis.map.MapImage Maven / Gradle / Ivy
package nl.tudelft.simulation.dsol.animation.gis.map;
import java.awt.Color;
import java.awt.Dimension;
import nl.tudelft.simulation.dsol.animation.gis.MapImageInterface;
/**
* This class defines the map image, which acts as the basic 'canvas' for the drawing process. The size does not matter that
* much, as it will be scaled to screen dimensions and clipped with the proper viewport.
*
* Copyright (c) 2020-2024 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See
* for project information DSOL Manual. The DSOL
* project is distributed under a three-clause BSD-style license, which can be found at
* DSOL License.
*
* @author Alexander Verbraeck
*/
public class MapImage implements MapImageInterface
{
/** */
private static final long serialVersionUID = 20201015L;
/** background color; default is fully transparent. */
private Color backgroundColor = new Color(255, 255, 255, 127);
/** canvas image size; default is HD screen size. */
private Dimension size = new Dimension(1920, 1080);
/** {@inheritDoc} */
@Override
public Color getBackgroundColor()
{
return this.backgroundColor;
}
/** {@inheritDoc} */
@Override
public void setBackgroundColor(final Color backgroundColor)
{
this.backgroundColor = backgroundColor;
}
/** {@inheritDoc} */
@Override
public Dimension getSize()
{
return this.size;
}
/** {@inheritDoc} */
@Override
public void setSize(final Dimension size)
{
this.size = size;
}
}