GetBlockRect

Blocks, Interaction

Description

Returns the placement rectangle of a template block in top-based facade coordinates

Syntax

Delphi

Function GetBlockRect(Page, BlockIndex: Integer; Out Left, Top, Width, Height: Double): Integer;

ActiveX

Function PDFlib::GetBlockRect(Page As Long, BlockIndex As Long, ByRef Left As Double, ByRef Top As Double, ByRef Width As Double, ByRef Height As Double) As Long

DLL

int DLGetBlockRect(int InstanceID, int Page, int BlockIndex, double Var Left, double Top, double Width, double Height);

Parameters

PageOne-based page number holding the block; the previously selected page is restored after the lookup
BlockIndexOne-based index of the block on that page
LeftReceives the left edge in top-based facade coordinates
TopReceives the top edge in top-based facade coordinates, that is the page height minus the PDF-space upper-right Y
WidthReceives the rectangle width
HeightReceives the rectangle height

Return values

1 on success with Left, Top, Width and Height filled, 0 when the index is out of range

See also

GetBlockName, GetBlockType, GetBlockProperty, AddBlock