A point representing a location in (x,y) coordinate space, specified in integer precision.
A point representing a location in (x,y) coordinate space, specified in integer precision.
(->point)
(->point p)
(->point x y)
Constructor.
Constructs and initializes a point at the specified (x,y) location in the coordinate space.
x - the X coordinate of the newly constructed Point - int
y - the Y coordinate of the newly constructed Point - int
Constructor. Constructs and initializes a point at the specified (x,y) location in the coordinate space. x - the X coordinate of the newly constructed Point - `int` y - the Y coordinate of the newly constructed Point - `int`
(equals this obj)
Determines whether or not two points are equal. Two instances of Point2D are equal if the values of their x and y member fields, representing their position in the coordinate space, are the same.
obj - an object to be compared with this Point2D - java.lang.Object
returns: true if the object to be compared is
an instance of Point2D and has
the same values; false otherwise. - boolean
Determines whether or not two points are equal. Two instances of Point2D are equal if the values of their x and y member fields, representing their position in the coordinate space, are the same. obj - an object to be compared with this Point2D - `java.lang.Object` returns: true if the object to be compared is an instance of Point2D and has the same values; false otherwise. - `boolean`
(get-location this)
Returns the location of this point. This method is included for completeness, to parallel the getLocation method of Component.
returns: a copy of this point, at the same location - java.awt.Point
Returns the location of this point. This method is included for completeness, to parallel the getLocation method of Component. returns: a copy of this point, at the same location - `java.awt.Point`
(get-x this)
Returns the X coordinate of this Point2D in double precision.
returns: the X coordinate of this Point2D. - double
Returns the X coordinate of this Point2D in double precision. returns: the X coordinate of this Point2D. - `double`
(get-y this)
Returns the Y coordinate of this Point2D in double precision.
returns: the Y coordinate of this Point2D. - double
Returns the Y coordinate of this Point2D in double precision. returns: the Y coordinate of this Point2D. - `double`
(move this x y)
Moves this point to the specified location in the (x,y) coordinate plane. This method is identical with setLocation(int, int).
x - the X coordinate of the new location - int
y - the Y coordinate of the new location - int
Moves this point to the specified location in the (x,y) coordinate plane. This method is identical with setLocation(int, int). x - the X coordinate of the new location - `int` y - the Y coordinate of the new location - `int`
(set-location this p)
(set-location this x y)
Changes the point to have the specified location.
This method is included for completeness, to parallel the setLocation method of Component. Its behavior is identical with move(int, int).
x - the X coordinate of the new location - int
y - the Y coordinate of the new location - int
Changes the point to have the specified location. This method is included for completeness, to parallel the setLocation method of Component. Its behavior is identical with move(int, int). x - the X coordinate of the new location - `int` y - the Y coordinate of the new location - `int`
(to-string this)
Returns a string representation of this point and its location in the (x,y) coordinate space. This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not be null.
returns: a string representation of this point - java.lang.String
Returns a string representation of this point and its location in the (x,y) coordinate space. This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not be null. returns: a string representation of this point - `java.lang.String`
(translate this dx dy)
Translates this point, at location (x,y), by dx along the x axis and dy along the y axis so that it now represents the point (x+dx,y+dy).
dx - the distance to move this point along the X axis - int
dy - the distance to move this point along the Y axis - int
Translates this point, at location (x,y), by dx along the x axis and dy along the y axis so that it now represents the point (x+dx,y+dy). dx - the distance to move this point along the X axis - `int` dy - the distance to move this point along the Y axis - `int`
(x this)
Instance Field.
The X coordinate of this Point. If no X coordinate is set it will default to 0.
type: int
Instance Field. The X coordinate of this Point. If no X coordinate is set it will default to 0. type: int
(y this)
Instance Field.
The Y coordinate of this Point. If no Y coordinate is set it will default to 0.
type: int
Instance Field. The Y coordinate of this Point. If no Y coordinate is set it will default to 0. type: int
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close