|
Gnostice PDFOne
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.gnostice.pdfone.PdfPoint
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."
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 |
public PdfPoint(double x, double y)
x
, y
).
x
- x-coordinate of the pointy
- y-coordinate of the pointpublic PdfPoint(PdfPoint p)
PdfPoint
object.
p
- a pointpublic PdfPoint(Point p)
Point
object.
p
- a pointpublic PdfPoint(Point2D p)
Point2D
object.
p
- a pointMethod Detail |
public double getX()
public void setX(double x)
x
- new x-coordinate for the pointpublic double getY()
public void setY(double y)
y
- new y-coordinate for the pointpublic Object clone() throws CloneNotSupportedException
CloneNotSupportedException
public String toString()
|
Pro. Ed. v1.41 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |