Example Of GetFittedExtents¶
Example Of GetFittedExtents¶
1if not impact.active_drawing.isNone():
2 fitted_extents = impact.active_drawing.active_layer.get_fitted_extents()
3
4 impact.gui.output_toolbox.clear()
5
6 impact.gui.output_toolbox.add("Bottom left (x): " + str(fitted_extents.bottom_left.x))
7 impact.gui.output_toolbox.add("Bottom left (y): " + str(fitted_extents.bottom_left.y))
8 impact.gui.output_toolbox.add("Top right (x): " + str(fitted_extents.top_right.x))
9 impact.gui.output_toolbox.add("Top right (y): " + str(fitted_extents.top_right.y))
10 impact.gui.output_toolbox.add("Width: " + str(fitted_extents.width))
11 impact.gui.output_toolbox.add("Height: " + str(fitted_extents.height))
12