android.image
Class OverlayXY

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

public class OverlayXY
extends Overlay

Represents the Overlaying of two images with 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"))


Field Summary
 
Fields inherited from class android.image.Image
BLACK_OUTLINE, CLEAR, WHITE
 
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(android.graphics.Canvas c, int xx, int yy)
          Draw this OverlayXY image into a Graphics
 
Methods inherited from class android.image.Overlay
height, width
 
Methods inherited from class android.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(android.graphics.Canvas c,
                  int xx,
                  int yy)
Draw this OverlayXY image into a Graphics

Overrides:
paint in class Overlay