android.image
Class Line

java.lang.Object
  extended by android.image.Image
      extended by android.image.Line

public class Line
extends Image

Class representing a Line from (0,0) to the given (X,Y).

    new Line(30, 30, "black")

    new Line(-30, 20, "red")

    new Line(30, -20, "red")


Field Summary
 
Fields inherited from class android.image.Image
BLACK_OUTLINE, CLEAR, WHITE
 
Constructor Summary
Line(double x, double y, java.lang.String color)
          Create a Line from (0,0) to ints (X,Y) of the given color
Line(int x, int y, java.lang.String color)
          Create a Line from (0,0) to doubles (X,Y) of the given color
Line(Posn p, java.lang.String color)
          Create a Line from (0,0) to doubles (X,Y) of the given color
 
Method Summary
 int height()
          Return the height of this Image
 void paint(android.graphics.Canvas c, int xx, int yy)
          Draw this 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

Line

public Line(int x,
            int y,
            java.lang.String color)
Create a Line from (0,0) to doubles (X,Y) of the given color


Line

public Line(double x,
            double y,
            java.lang.String color)
Create a Line from (0,0) to ints (X,Y) of the given color


Line

public Line(Posn p,
            java.lang.String color)
Create a Line from (0,0) to doubles (X,Y) of the given color

Method Detail

paint

public void paint(android.graphics.Canvas c,
                  int xx,
                  int yy)
Draw this 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