dlg_draw_line()
Draws a line on an image component within a dialog.
Syntax
planetcnc.dlg_draw_line(component, x1, y1, x2, y2, thickness)
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 line. | |
Return Value
Examples
#! /usr/bin/env python
import planetcnc
# Draw a line on an image component
planetcnc.dlg_draw_line(my_component, 10, 10, 100, 100, 2)
print("Line drawn on image.")
See also