They're measured in millimeters by default. However you can change it using the function setPageUnit.
The X (abscissa) and Y (ordinate) values are by default started from the top-left hand side of the document/page. However this can be changed using RTL (right-to-left) mode using the setRTL function.