Path
Path
Source code in gdsr/_gdsr.pyi
321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 |
|
__init__
__init__(points: InputPointsLike, layer: Layer = 0, data_type: DataType = 0, path_type: PathType | None = None, width: float | None = None) -> None
set_points
set_points(points: InputPointsLike) -> Self
set_layer
set_data_type
set_path_type
set_path_type(path_type: PathType | None) -> Self
set_width
copy
move_to
move_to(point: PointLike) -> Self
Move the path to a point.
This method modifies the path in place and returns itself.
Parameters:
-
point
(PointLike
) –Point to move the path to.
move_by
move_by(vector: PointLike) -> Self
Move the path by a vector.
This method modifies the path in place and returns itself.
Parameters:
-
vector
(PointLike
) –Vector to move the path by.
rotate
rotate(angle: float, centre: PointLike = Point(0, 0)) -> Self
Rotate the path by an angle around a centre point.
This method modifies the path in place and returns itself.
Parameters:
-
angle
(float
) –Counter-clockwise rotation angle in degrees.
-
centre
(PointLike
, default:Point(0, 0)
) –Centre point of rotation, defaults to (0, 0).
Source code in gdsr/_gdsr.pyi
scale
scale(factor: float, centre: PointLike = Point(0, 0)) -> Self
Scale the path by a factor around a centre point.
This method modifies the path in place and returns itself.
Parameters:
-
factor
(float
) –Scaling factor.
-
centre
(PointLike
, default:Point(0, 0)
) –Centre point of scaling, defaults to (0, 0).
Source code in gdsr/_gdsr.pyi
is_on
is_on(*layer_data_types: LayerDataType) -> bool