android.image
Class RegularPolygon

java.lang.Object
  extended by android.image.Image
      extended by android.image.RegularPolygon
Direct Known Subclasses:
Star

public class RegularPolygon
extends Image

Represents an Image of a Regular Polygon.

    new RegularPolygon(50, 3, "outline", "red")

    new RegularPolygon(40, 4, "outline", "blue")

    new RegularPolygon(20, 8, "solid", "red")


Field Summary
 
Fields inherited from class android.image.Image
BLACK_OUTLINE, CLEAR, WHITE
 
Constructor Summary
RegularPolygon(double radius, int sides, java.lang.String mode, java.lang.String color)
          Create a Regular Polygon Image with (double) radius, sides, mode and color
RegularPolygon(int radius, int sides, java.lang.String mode, java.lang.String color)
          Create a Regular Polygon Image with (int) radius, sides, skip, mode and color
 
Method Summary
 int height()
          Return the Height of this Image
 void paint(android.graphics.Canvas c, int x, int y)
          Paint this Polygon into the given 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

RegularPolygon

public RegularPolygon(double radius,
                      int sides,
                      java.lang.String mode,
                      java.lang.String color)
Create a Regular Polygon Image with (double) radius, sides, mode and color


RegularPolygon

public RegularPolygon(int radius,
                      int sides,
                      java.lang.String mode,
                      java.lang.String color)
Create a Regular Polygon Image with (int) radius, sides, skip, mode and color

Method Detail

paint

public void paint(android.graphics.Canvas c,
                  int x,
                  int y)
Paint this Polygon into the given 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