android.image
Class Overlay

java.lang.Object
  extended by android.image.Image
      extended by android.image.Overlay
Direct Known Subclasses:
OverlayXY

public class Overlay
extends Image

Represents the Overlaying of two or more images.

    new Overlay(new Rectangle(30, 60, "solid", "orange"),
                new Ellipse(60, 30, "solid", "purple"))

    new Overlay(new Ellipse(10, 10, "solid", "red"),
                new Ellipse(20, 20, "solid", "black"),
                new Ellipse(30, 30, "solid", "red"),
                new Ellipse(40, 40, "solid", "black"),
                new Ellipse(50, 50, "solid", "red"),
                new Ellipse(60, 60, "solid", "black"))

    new Overlay(new RegularPolygon(20, 5, "solid", "#3232FF"),
                new RegularPolygon(26, 5, "solid", "#6464FF"),
                new RegularPolygon(32, 5, "solid", "#9696FF"),
                new RegularPolygon(38, 5, "solid", "#C8C8FF"),
                new RegularPolygon(44, 5, "solid", "#FAFAFF"))


Image overlays are also available as a method on Images.
    new Ellipse(60, 30, "solid", "purple")
        .overlay(new Rectangle(30, 60, "solid", "orange"))

    new Ellipse(60, 60, "solid", "black")
        .overlay(new Ellipse(10, 10, "solid", "red"),
                 new Ellipse(20, 20, "solid", "black"),
                 new Ellipse(30, 30, "solid", "red"),
                 new Ellipse(40, 40, "solid", "black"),
                 new Ellipse(50, 50, "solid", "red"))

    new RegularPolygon(44, 5, "solid", "#FAFAFF")
        .overlay(new RegularPolygon(20, 5, "solid", "#3232FF"),
                 new RegularPolygon(26, 5, "solid", "#6464FF"),
                 new RegularPolygon(32, 5, "solid", "#9696FF"),
                 new RegularPolygon(38, 5, "solid", "#C8C8FF"))


Field Summary
 
Fields inherited from class android.image.Image
BLACK_OUTLINE, CLEAR, WHITE
 
Constructor Summary
Overlay(Image top, Image next, Image... imgs)
          Construct an Overlay from the two or more Images
 
Method Summary
 int height()
          Return the height of this Image
 void paint(android.graphics.Canvas c, int xx, int yy)
          Draw this Overlay image into a Graphics
 int width()
          Return the width of this Image
 
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

Overlay

public Overlay(Image top,
               Image next,
               Image... imgs)
Construct an Overlay from the two or more Images

Method Detail

paint

public void paint(android.graphics.Canvas c,
                  int xx,
                  int yy)
Draw this Overlay image into a Graphics

Specified by:
paint in class Image

width

public int width()
Return the width of this Image

Specified by:
width in class Image

height

public int height()
Return the height of this Image

Specified by:
height in class Image