ImageEn, unit iexPdfiumCore |
|
TPdfObject.X
Declaration
property X: Double;
Description
Specify the left position of an object (in PDF points).
PDF Y values are Bottom-up, so (X,Y) specifies the bottom-left of the object onscreen (if the image is not
rotated).
For
rotated images, x,y specifies the point of rotation. So if rotated 180 deg. for example, x,y will be the top-right of the image.
Note:
◼PDF X values run from X=0 (page left) to X=
PageWidth (page right)
◼The
object matrix is used to calculate and set the value
◼You can also use
Translate to move an object
Read/write
PDF Page Points
Objects on a PDF page are specified in points that originate at the bottom-left, i.e. when X,Y = (0,0). The top-left of the page is specified by (
PageWidth,
PageHeight).
To convert PDF points to screen values, use
PageToScr.
// Move an object left
obj := ImageEnView1.PdfViewer.Objects[idx];
obj.X := obj.X - 10;
// Which is the same as...
ImageEnView1.PdfViewer.Objects.Translate( -10, 0 );
// Move an object right
obj := ImageEnView1.PdfViewer.Objects[idx];
obj.X := obj.X + 10;
// Which is the same as...
ImageEnView1.PdfViewer.Objects.Translate( 10, 0 );
See Also
◼Y
◼Width
◼Height
◼Matrix
◼Scale
◼Translate
◼TransformEx