Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## Class Pix

    java.lang.Object
      |
      +--Pix

public class Pix
extends java.lang.Object

The `Pix` class is my own implementation of java.awt.geom.Point2D.Double. I had to make it because the Point2D.Double exists since JDK1.2 and I wanted my app to run under the JDK1.1.x browsers (IE5,NS4).

It defines a point representing a location in (x, y) coordinate space. The storage representation of both values is `double`

See Also:
  `Point2D`

Field Summary
`double` | `x` The X coordinate of this `Pix`.
`double` | `y` The Y coordinate of this `Pix`.

Constructor Summary
`Pix()` Constructs and initializes a `Pix` with coordinates (0, 0).
`Pix(double ix, double iy)` Constructs and initializes a `Pix` with the specified coordinates.

Method Summary
`double` | `getX()` Returns the X coordinate of this `Pix` in `double` precision.
`double` | `getY()` Returns the Y coordinate of this `Pix` in `double` precision.
`void` | `setLocation(double ix, double iy)` Sets the location of this `Pix` to the specified `double` coordinates.
`java.lang.String` | `toString()` Returns a `String` that represents the value of this `Pix`.
`java.lang.String` | `toString(int precision)` Returns a `String` that represents the value of this `Pix`.
`java.lang.String` | `toString(int xprecision, int yprecision)` Returns a `String` that represents the value of this `Pix`.

Methods inherited from class java.lang.Object
`, clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### x

    public double x

  The X coordinate of this `Pix`.

### y

    public double y

  The Y coordinate of this `Pix`.

Constructor Detail

### Pix

    public Pix()

  Constructs and initializes a `Pix` with coordinates (0, 0).

### Pix

    public Pix(double ix,
               double iy)

  Constructs and initializes a `Pix` with the specified coordinates.
  Parameters:
    `x, y` - the coordinates to which to set the newly constructed `Pix` coordinates (0, 0).

Method Detail

### getX

    public double getX()

  Returns the X coordinate of this `Pix` in `double` precision.
  Returns:
    the X coordinate of this `Pix`.

### getY

    public double getY()

  Returns the Y coordinate of this `Pix` in `double` precision.
  Returns:
    the Y coordinate of this `Pix`.

### setLocation

    public void setLocation(double ix,
                            double iy)

  Sets the location of this `Pix` to the specified `double` coordinates.
  Parameters:
    `x, y` - the coordinates to which to set this `Pix`

### toString

    public java.lang.String toString(int xprecision,
                                     int yprecision)

  Returns a `String` that represents the value of this `Pix`. Real x,y values are multiplied by given coeficients.
  Parameters:
    `xprecision, yprecision` - x y multiplification coeficients
  Returns:
    a string representation of this `Pix`.

### toString

    public java.lang.String toString(int precision)

  Returns a `String` that represents the value of this `Pix`. Both x,y values are multiplied by the same coeficient.
  Parameters:
    `precision` - common multiplification coeficient
  Returns:
    a string representation of this `Pix`.

### toString

    public java.lang.String toString()

  Returns a `String` that represents the value of this `Pix`.
  Overrides:
    `toString` in class `java.lang.Object`
  Returns:
    a string representation of this `Pix`.

Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD