Knowing the size of the image extents, or limits, is sometimes useful. You might want this information to figure out if an image should be cropped or resized, or whether its print will fit on one piece of paper at actual size.
Normally you only require the extents of displayed objects. For that purpose, use the following two commands.
To get the extents of the displayed layers on a page:
· Use the GetVisiblePageMER transaction.
The top-left and bottom-right coordinates of the page extents are returned. Only the displayed layers on the page are considered.
To get the extents of a displayed layer:
· Use the GetVisibleLayerMER transaction.
The top-left and bottom-right coordinates of the layer extents are returned. If the layer is hidden, values of 0,0,0,0 are returned.
If you want to take hidden layers into account when requesting image extents, use the following two transaction.
To get the extents of all layers on a page:
· Use the GetPageMER transaction.
The top-left and bottom-right coordinates of the page extents are returned. Both displayed and hidden layers are considered.
To get the extents of a layer:
· Use the GetLayerMER transaction.
The top-left and bottom-right coordinates of the layer extents are returned. If the layer is hidden, values of 0,0,0,0 are returned.
See also