de.caff.vic

## Class PaintableImage

- java.lang.Object
- - de.caff.vic.PaintableImage

- All Implemented Interfaces:
    Paintable

      public class PaintableImage
      extends java.lang.Object
      implements Paintable

  An image defined as a paintable,

  In general usage of images should be avoided, as they counteract the purpose of having a scalable icon.

  Author:
    Rammi

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `PaintableImage(java.awt.Image image, java.awt.geom.AffineTransform transform)` Constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `accept(PaintableVisitor visitor)` Accept a visitor.
    `java.awt.Image` | `getImage()` Get the image.
    `java.awt.geom.AffineTransform` | `getTransform()` Get the transformation.
    `void` | `paintTo(java.awt.Graphics2D g2, Context context)` Paint this object to the given graphics context.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### PaintableImage

          public PaintableImage(@NotNull
                                java.awt.Image image,
                                @NotNull
                                java.awt.geom.AffineTransform transform)

      Constructor.
      Parameters:
        `image` - image to draw
        `transform` - transformation to use

  - ### Method Detail

    - #### paintTo

          public void paintTo(@NotNull
                              java.awt.Graphics2D g2,
                              @NotNull
                              Context context)

      Description copied from interface: `Paintable`
      Paint this object to the given graphics context.
      Specified by:
        `paintTo` in interface `Paintable`
      Parameters:
        `g2` - graphics
        `context` - drawing context

    - #### accept

          public void accept(@NotNull
                             PaintableVisitor visitor)

      Accept a visitor. This is one half of the visitor pattern.
      Specified by:
        `accept` in interface `Paintable`
      Parameters:
        `visitor` - visitor for this paintable

    - #### getImage

          @NotNull
          public java.awt.Image getImage()

      Get the image.
      Returns:
        the image

    - #### getTransform

          @NotNull
          public java.awt.geom.AffineTransform getTransform()

      Get the transformation.
      Returns:
        transformation