image
Class OverlayXY

java.lang.Object
  extended by image.Image
      extended by image.Overlay
          extended by image.OverlayXY

public class OverlayXY
extends Overlay

Represents the Overlaying of two images after moving the bottom image by the given offset.

    new OverlayXY(new Rectangle(20, 20, "outline", "black"),
                20, 0, new Rectangle(20, 20, "outline", "black"))

    new OverlayXY(new Rectangle(20, 20, "solid", "red"),
                20, 20,
                new Rectangle(20, 20, "solid", "black"))

    new OverlayXY(new Rectangle(20, 20, "solid", "red"),
                -20, -20,
                new Rectangle(20, 20, "solid", "black"))

    new OverlayXY(
           new OverlayXY(new Ellipse(40, 40, "outline", "black"),
                 10, 15, new Ellipse(10, 10, "solid", "forestgreen")),
                 20, 15, new Ellipse(10, 10, "solid", "forestgreen"))


Image overlays are also available as a method on Images.
    new Rectangle(20, 20, "outline", "black")
        .overlayxy(new Rectangle(20, 20, "outline", "black"), 20, 0)

    new Rectangle(20, 20, "solid", "black")
        .overlayxy(new Rectangle(20, 20, "solid", "red"), 20, 20)

    new Rectangle(20, 20, "solid", "black")
        .overlayxy(new Rectangle(20, 20, "solid", "red"), -20, -20)

    new Ellipse(10, 10, "solid", "forestgreen")
        .overlayxy(20, 15, new Ellipse(10, 10, "solid", "forestgreen")
                               .overlayxy(10, 15, new Ellipse(40, 40, "outline", "black"))


Constructor Summary
OverlayXY(Image top, double x, double y, Image bot)
          Construct an OverlayXY from the two images and the offset (X,Y)
OverlayXY(Image top, int x, int y, Image bot)
          Construct an OverlayXY from the two images and the offset (X,Y)
OverlayXY(Image top, Posn p, Image bot)
          Construct an OverlayXY from the two images and the Posn offset
 
Method Summary
 void paint(java.awt.Graphics g, int xx, int yy)
          Draw this OverlayXY image into a Graphics
 
Methods inherited from class image.Overlay
height, width
 
Methods inherited from class image.Image
flipHorizontal, flipVertical, overlay, overlay, overlayxy, overlayxy, overlayxy, overlayxy, overlayxy, overlayxy, rasterize, rotate, rotate, toFile, toScene, toWhiteFile, toWhiteScene
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OverlayXY

public OverlayXY(Image top,
                 int x,
                 int y,
                 Image bot)
Construct an OverlayXY from the two images and the offset (X,Y)


OverlayXY

public OverlayXY(Image top,
                 Posn p,
                 Image bot)
Construct an OverlayXY from the two images and the Posn offset


OverlayXY

public OverlayXY(Image top,
                 double x,
                 double y,
                 Image bot)
Construct an OverlayXY from the two images and the offset (X,Y)

Method Detail

paint

public void paint(java.awt.Graphics g,
                  int xx,
                  int yy)
Draw this OverlayXY image into a Graphics

Overrides:
paint in class Overlay