ImageEn, unit iexPdfiumCore |
|
TPdfObject.Y
Declaration
property Y: Double;
Description
Specify the bottom position of an object (in PDF points).
PDF Y values are Bottom-up, so (X,Y) specifies the bottom-left of the object onscreen.
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 Y values are Bottom-up, i.e. Y=0 refers to the bottom of the page/screen. Y=
PageHeight refers to the top of the page/screen
◼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 up
obj := ImageEnView1.PdfViewer.Objects[idx];
// Note: PDF documents are bottom-up
obj.Y := obj.Y + 10;
// Which is the same as...
ImageEnView1.PdfViewer.Objects.Translate( 0, 10 ); // Note: PDF documents are bottom-up
// Move an object down
obj := ImageEnView1.PdfViewer.Objects[idx];
// Note: PDF documents are bottom-up
obj.Y := obj.Y - 10;
// Which is the same as...
ImageEnView1.PdfViewer.Objects.Translate( 0, -10 ); // Note: PDF documents are bottom-up
See Also
◼X
◼Width
◼Height
◼Matrix
◼Scale
◼Translate
◼TransformEx