30package com.jogamp.nativewindow.util;
36 public Point(
final int x,
final int y) {
54 }
catch (
final CloneNotSupportedException ex) {
55 throw new InternalError();
73 public boolean equals(
final Object obj) {
74 if(
this == obj) {
return true; }
75 if (obj instanceof
Point) {
77 return y == p.y && x == p.x;
96 hash = ((hash << 5) - hash) + y;
102 return x +
" / " + y;
111 public final Point set(
final int x,
final int y) { this.x = x; this.y = y;
return this; }
117 public final Point setX(
final int x) { this.x = x;
return this; }
123 public final Point setY(
final int y) { this.y = y;
return this; }
186 x = (int)(x * sx + 0.5f);
187 y = (int)(y * sy + 0.5f);
214 x = (int)(x / sx + 0.5f);
215 y = (int)(y / sy + 0.5f);
final Point translate(final PointImmutable pd)
Translate this instance's x- and y-components, i.e.
final Point setX(final int x)
Set this instance's x–component.
final Point translate(final Point pd)
Translate this instance's x- and y-components, i.e.
final Point scale(final int sx, final int sy)
Scale this instance's x- and y-components, i.e.
Point(final int x, final int y)
final Point setY(final int y)
Set this instance's y-component.
final Point translate(final int dx, final int dy)
Translate this instance's x- and y-components, i.e.
final Point scaleInv(final float sx, final float sy)
Inverse scale this instance's x- and y-components, i.e.
boolean equals(final Object obj)
Checks whether two points objects are equal.
final Point scale(final float sx, final float sy)
Scale this instance's x- and y-components, i.e.
int compareTo(final PointImmutable d)
final Point scaleInv(final int sx, final int sy)
Inverse scale this instance's x- and y-components, i.e.
Immutable Point interface.