* Adds a line to the current graphic document. */
| 114 | * Adds a line to the current graphic document. |
| 115 | */ |
| 116 | void rsPyAddLine(double x1, double y1, double x2, double y2) { |
| 117 | //printf("c: addLine called\n"); |
| 118 | //printf("c: parameter from python: %f\n", x1); |
| 119 | |
| 120 | RS_Graphic* graphic = RS_SIMPLEPYTHON->getGraphic(); |
| 121 | if (graphic) { |
| 122 | graphic->addEntity(new RS_Line(graphic, |
| 123 | RS_LineData(RS_Vector(x1, y1), |
| 124 | RS_Vector(x2, y2)))); |
| 125 | } else { |
| 126 | std::cerr << "rsPyAddLine: No graphic object set.\n"; |
| 127 | } |
| 128 | } |
| 129 | |
| 130 | /** |
| 131 | * Python wrapper. |
no test coverage detected