Package uk.ac.starlink.ttools.plot
Interface Picture
public interface Picture
Interface for a self-contained object which can paint itself on a
graphics context.
It's very like an
Icon
, but intended for
use in contexts which may be headless.- Since:
- 20 Jan 2012
- Author:
- Mark Taylor
-
Method Summary
Modifier and TypeMethodDescriptionint
Get vertical extent.int
Get horizontal extent.void
Paint the content of this painting on the given graphics context.
-
Method Details
-
getPictureWidth
int getPictureWidth()Get horizontal extent.- Returns:
- width in pixels
-
getPictureHeight
int getPictureHeight()Get vertical extent.- Returns:
- height in pixels
-
paintPicture
Paint the content of this painting on the given graphics context. The intended graphics content ought only to extend between 0 and width on the X axis and 0 and height on the Y axis.- Parameters:
g2
- graphics context- Throws:
IOException
-