get graphic layer's bounding box in page coordinate
bool get_layer_rect_page_units( const GraphLayer & grl, int & nLeft, int & nTop, int & nRight, int & nBottom )
true for success
EX1
//Before run this code, make sure the layer to get the bounding box is active void show_layer_in_page_percet() { GraphLayer grl = Project.ActiveLayer(); double dPageW, dPageH; LT_get_var("page.width",&dPageW); LT_get_var("page.height",&dPageH); int left, top, right, bottom; get_layer_rect_page_units(grl, left, top, right, bottom); printf("layer width is %g percent of page width, height is %g percent\n", (right-left) * 100./dPageW, (bottom - top) * 100./dPageH); }
origin.h