dlg_draw_arrow()
Draws an arrow on an image component within a dialog.
Syntax
planetcnc.dlg_draw_arrow(component, x1, y1, x2, y2, thickness, head_width, head_length)
Parameters
| Parameter | Type | Description | Comment |
| component | capsule | Capsule object representing the component. | |
| x1 | float | X-coordinate of the starting point. | |
| y1 | float | Y-coordinate of the starting point. | |
| x2 | float | X-coordinate of the ending point. | |
| y2 | float | Y-coordinate of the ending point. | |
| thickness | float | Thickness of the arrow line. | |
| head_width | float | Width of the arrowhead. | |
| head_length | float | Length of the arrowhead. | |
Return Value
Examples
#! /usr/bin/env python
import planetcnc
# Draw an arrow on an image component
planetcnc.dlg_draw_arrow(my_component, 10, 10, 100, 100, 2, 5, 10)
print("Arrow drawn on image.")
See also