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 Detail

      • getPictureWidth

        int getPictureWidth()
        Get horizontal extent.
        Returns:
        width in pixels
      • getPictureHeight

        int getPictureHeight()
        Get vertical extent.
        Returns:
        height in pixels
      • paintPicture

        void paintPicture​(java.awt.Graphics2D g2)
                   throws java.io.IOException
        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:
        java.io.IOException