FileDocCategorySizeDatePackage
Point.javaAPI DocAndroid 1.5 API1909Wed May 06 22:42:00 BST 2009android.graphics

Point

public class Point extends Object
Point holds two integer coordinates

Fields Summary
public int
x
public int
y
Constructors Summary
public Point()

public Point(int x, int y)

        this.x = x;
        this.y = y;
    
public Point(Point src)

        this.x = src.x;
        this.y = src.y;
    
Methods Summary
public final booleanequals(int x, int y)
Returns true if the point's coordinates equal (x,y)

        return this.x == x && this.y == y;
    
public booleanequals(java.lang.Object o)

        if (o instanceof Point) {
            Point p = (Point) o;
            return this.x == p.x && this.y == p.y;
        }
        return false;
    
public inthashCode()

        return x * 32713 + y;
    
public final voidnegate()
Negate the point's coordinates

        x = -x;
        y = -y;
    
public final voidoffset(int dx, int dy)
Offset the point's coordinates by dx, dy

        x += dx;
        y += dy;
    
public voidset(int x, int y)
Set the point's x and y coordinates

        this.x = x;
        this.y = y;
    
public java.lang.StringtoString()

        return "Point(" + x + ", " + y+ ")";