Interface InteractiveImage

All Superinterfaces:
Drawable, DrawableImage, Interactive, Measurable
All Known Subinterfaces:
Video
All Known Implementing Classes:
GifVideo, ImageVideo, JSMovieVideo, MovieVideo, VideoAdapter, XuggleVideo

public interface InteractiveImage extends Interactive, DrawableImage
This defines methods used by interactive drawable images.
Version:
1.0
Author:
Douglas Brown
  • Method Details

    • setRelativeAspect

      void setRelativeAspect(double relativeAspect)
      Sets the relative aspect of the displayed image. The pixel aspect of an image is the ratio of its pixel width to height. Its world aspect is the ratio of width to height in world units. For example, a 320 x 240 pixel image has a pixel aspect of 4/3. If its relative aspect is set to 2, then the world aspect of the image will be 8/3. This means that if the image width is set to 16, its height will be 6. Conversely, if its height is set to 10, its width will be 8/3 x 10 = 26.666.
      Parameters:
      relativeAspect - the world aspect of the image relative to its pixel aspect.
    • getRelativeAspect

      double getRelativeAspect()
      Gets the relative aspect of the displayed image.
      Returns:
      the relative aspect of the displayed image
      See Also:
    • setWidth

      void setWidth(double width)
      Sets the width of the image in world units. This method also sets the height using the relative aspect.
      Parameters:
      width - the width in world units
      See Also:
    • getWidth

      double getWidth()
      Gets the width of the image in world units.
      Returns:
      the width of the image
    • setHeight

      void setHeight(double height)
      Sets the height of the image in world units. This method also sets the width using the relative aspect.
      Parameters:
      height - the height in world units
      See Also:
    • getHeight

      double getHeight()
      Gets the height of the image in world units.
      Returns:
      the height of the image
    • setAngle

      void setAngle(double theta)
      Sets the angle in radians of the image base measured ccw from the world x-axis.
      Parameters:
      theta - the angle in radians
    • getAngle

      double getAngle()
      Gets the angle in radians of the image base measured ccw from the world x-axis.
      Returns:
      the angle in radians
    • getCoords

      ImageCoordSystem getCoords()
      Gets the image coordinate system.
      Returns:
      the image coordinate system
    • setCoords

      void setCoords(ImageCoordSystem coords)
      Sets the image coordinate system.
      Parameters:
      coords - the image coordinate system