Point Class

Point Class

This Package | All Packages

public class Point
implements IConstructable, IPersistable

Represents a single (x,y) coordinate and various operations on such a coordinate.

Fields
Name Description
x The horizontal position of the coordinate.
y The vertical position of the coordinate.

Constructors
Name Description
Point() Creates a new Point object at 0, 0.
Point(int x, int y) Creates a new Point object at the given location.
Point(Point pt) Creates a new Point object given an existing Point object.
Point(POINT pt) Creates a new Point object given a Win32 POINT structure.
Point(SIZE size) Creates a new Point object given a Win32 SIZE structure.
Point(int dw) Creates a new Point object given the coordinates in a 32-bit integer.
Point(IDataStream stream) Topic under construction.

Methods
Name Description
equals(Object obj) Tests to determine if the two points represent the same logical location.
getConstructorArgs() Topic under construction.
getExtension() Topic under construction.
hashCode() Topic under construction.
save(IDataStream stream) Topic under construction.
toPOINT() Returns a Win32 POINT structure representing this object.
toSIZE() Returns a Win32 SIZE structure representing this object.
toString() Topic under construction.

Fields

Point.x

Syntax
public int x;
Description
The horizontal position of the coordinate.

Point.y

Syntax
public int y;
Description
The vertical position of the coordinate.

Constructors

Point.Point

Syntax 1
public Point();
Description

Creates a new Point object at 0, 0.



Syntax 2
public Point( int x, int y );
Parameters
x
The horizontal positon of the point.
y
The vertical position of the point.
Description

Creates a new Point object at the given location.



Syntax 3
public Point( Point pt );
Parameters
pt
The point object.
Description

Creates a new Point object given an existing Point object.



Syntax 4
public Point( POINT pt );
Parameters
pt
A Win32 POINT object.
Description

Creates a new Point object given a Win32 POINT structure.



Syntax 5
public Point( SIZE size );
Parameters
size
A Win32 SIZE structure.
Description

Creates a new Point object given a Win32 SIZE structure.



Syntax 6
public Point( int dw );
Parameters
dw
An integer with the two coordinate values in it.
Description

Creates a new Point object given the coordinates in a 32-bit integer. The low-order 16 bits are the horizontal [x] coordinate and the higher 16 bits are the vertical [y] coordinate.



Syntax 7
public Point( IDataStream stream );
Description

Topic under construction.

Methods

Point.equals

Syntax
public boolean equals( Object obj );
Parameters
value
Determines if this object is the same as the current one.
Return Value

Returns true if they are the same; otherwise, returns false.

Description

Tests to determine if the two points represent the same logical location. Doesn't actually test for object identity equality.

Point.getConstructorArgs

Syntax
public ConstructorArg[] getConstructorArgs();
Description

Topic under construction.

Point.getExtension

Syntax
public String getExtension();
Description

Topic under construction.

Point.hashCode

Syntax
public int hashCode();
Description

Topic under construction.

Point.save

Syntax
public void save( IDataStream stream );
Description

Topic under construction.

Point.toPOINT

Syntax
public POINT toPOINT();
Return Value

Returns a Win32 POINT structure.

Description

Returns a Win32 POINT structure representing this object.

Point.toSIZE

Syntax
public SIZE toSIZE();
Return Value

Returns a Win32 SIZE structure.

Description

Returns a Win32 SIZE structure representing this object.

Point.toString

Syntax
public String toString();
Description

Topic under construction.