Package rea.components
Class Visual
java.lang.Object
rea.components.Visual
A visual representation of a game component.
It includes an image and the size in pixels to which it should be scaled.
- Author:
- José Paulo Leal
jpleal@fc.up.pt
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Visual
Create a visual representation of a game component.- Parameters:
pathname
- path to imagewidth
- width in pixelsheight
- height in pixels
-
-
Method Details
-
getPathname
The path to image to be displayed. The path is relative to {resources/META-INF/resources} directory.- Returns:
- path to image
-
getWidth
public int getWidth()The width in pixels to which the image should be scaled- Returns:
- width in pixels
-
getHeight
public int getHeight()The height in pixels to which the image should be scaled- Returns:
- height in pixels
-
equals
-