Gnostice PDFOne
Pro. Ed. v1.41


com.gnostice.pdfone
Class PdfPoint

java.lang.Object
  extended bycom.gnostice.pdfone.PdfPoint

public class PdfPoint
extends Object

This class represents a point on a page. Its position is expressed in x-y coordinates. However, these coordinates are applied in a literal sense. As a result, the actual position of a PdfPoint object on a page is wholly dependent on whatever measurement unit that is currently applicable.

For example, on a page where the measurement unit is inch, the x-y coordinates of a point will be applied in inches, literally. On a page with pixel as the measurement unit, coordinates of the same point will applied in pixels, literally. As this can cause serious shifts in position, care has to be taken when reusing a point in different places or in different situations.

Some classes may have methods that specify a PdfPoint object and a particular measurement unit as arguments. In these cases, the coordinates of the PdfPoint object are applied in the specified measurement unit. When no measurement unit is specified or can be determined, the coordinates are applied in default as points, or points as in "one inch equals 72 points equals 96 pixels."

Since:
1.0
Version:
1.0

Constructor Summary
PdfPoint(double x, double y)
          Constructs a point at position (x, y).
PdfPoint(PdfPoint p)
          Constructs a point at the same position as specified PdfPoint object.
PdfPoint(Point p)
          Constructs a point at the same position as specified Point object.
PdfPoint(Point2D p)
          Constructs a point at the same position as specified Point2D object.
 
Method Summary
 Object clone()
           
 double getX()
          Returns x-coordinate of this point.
 double getY()
          Returns y-coordinate of this point.
 void setX(double x)
          Specifies new x-coordinate for this point.
 void setY(double y)
          Specifies new y-coordinate for this point.
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PdfPoint

public PdfPoint(double x,
                double y)
Constructs a point at position (x, y).

Parameters:
x - x-coordinate of the point
y - y-coordinate of the point
Since:
1.0
Sample Code
See example.

PdfPoint

public PdfPoint(PdfPoint p)
Constructs a point at the same position as specified PdfPoint object.

Parameters:
p - a point
Sample Code
See example.

PdfPoint

public PdfPoint(Point p)
Constructs a point at the same position as specified Point object.

Parameters:
p - a point
Sample Code
See example.

PdfPoint

public PdfPoint(Point2D p)
Constructs a point at the same position as specified Point2D object.

Parameters:
p - a point
Sample Code
See example.
Method Detail

getX

public double getX()
Returns x-coordinate of this point.

Returns:
x-coordinate of the point
Since:
1.0
Sample Code
See example.

setX

public void setX(double x)
Specifies new x-coordinate for this point.

Parameters:
x - new x-coordinate for the point
Since:
1.0
Sample Code
See example.

getY

public double getY()
Returns y-coordinate of this point.

Returns:
y-coordinate of the point
Since:
1.0
Sample Code
See example.

setY

public void setY(double y)
Specifies new y-coordinate for this point.

Parameters:
y - new y-coordinate for the point
Since:
Sample Code
See example.

clone

public Object clone()
             throws CloneNotSupportedException
Throws:
CloneNotSupportedException

toString

public String toString()

Gnostice PDFOne
Pro. Ed. v1.41

To contact our support team, send an e-mail to support@gnostice.com.
 
© 2006 Gnostice Information Technologies Private Limited. All rights reserved.
www.gnostice.com