GetBlockRect

块、交互

描述

返回模板块在顶基准门面坐标下的摆放矩形

语法

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);

参数

Page包含该块的页码,从 1 开始;查找后会恢复先前选定的页面
BlockIndex该页面上块的索引,从 1 开始
Left接收顶基准门面坐标中的左边缘
Top接收顶基准门面坐标中的上边缘,即页面高度减去 PDF 空间中右上角的 Y
Width接收矩形宽度
Height接收矩形高度

返回值

成功返回 1 并填充 Left、Top、Width、Height;索引越界返回 0

另请参阅

GetBlockName, GetBlockType, GetBlockProperty, AddBlock