【お知らせ】この部分は英語原文のみでの提供となります。何卒ご了承ください。
2.1.14.3.7 get_layer_rect_page_units
Contents
Description
get graphic layer's bounding box in page coordinate
Syntax
bool get_layer_rect_page_units( const GraphLayer & grl, int & nLeft, int & nTop, int & nRight, int & nBottom )
Parameters
- grl
- [input] the layer to get the bounding box
- nLeft
- [output] layer's left position in page coordinate
- nTop
- [output] layer's top position in page coordinate
- nRight
- [output] layer's right position in page coordinate
- nBottom
- [output] layer's bottom position in page coordinate
Return
true for success
Examples
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); }
Remark
See Also
Header to Include
origin.h