Text
Text
Source code in gdsr/_gdsr.pyi
561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 |
|
vertical_presentation
instance-attribute
vertical_presentation: VerticalPresentation
Text vertical presentation.
horizontal_presentation
instance-attribute
horizontal_presentation: HorizontalPresentation
Text horizontal presentation.
__init__
__init__(text: str, origin: PointLike = Point(0, 0), layer: Layer = 0, magnification: float = 1.0, angle: float = 0.0, x_reflection: bool = False, vertical_presentation: VerticalPresentation = VerticalPresentation.Middle, horizontal_presentation: HorizontalPresentation = HorizontalPresentation.Centre) -> None
Initialize the Text with text and origin.
Parameters:
-
text
(str
) –Text content.
-
origin
(PointLike
, default:Point(0, 0)
) –Text origin, defaults to Point(0, 0).
-
layer
(Layer
, default:0
) –Text layer, defaults to 0.
-
magnification
(float
, default:1.0
) –Text magnification, defaults to 1.0.
-
angle
(float
, default:0.0
) –Text angle in degrees, defaults to 0.0.
-
x_reflection
(bool
, default:False
) –Text x reflection, defaults to False.
-
vertical_presentation
(VerticalPresentation
, default:VerticalPresentation.Middle
) –Text vertical presentation, defaults to VerticalPresentation.Middle.
-
horizontal_presentation
(HorizontalPresentation
, default:HorizontalPresentation.Centre
) –Text horizontal presentation, defaults to HorizontalPresentation.Centre.
Source code in gdsr/_gdsr.pyi
set_text
set_origin
set_origin(origin: PointLike) -> Self
set_layer
set_magnification
set_angle
set_x_reflection
set_vertical_presentation
set_vertical_presentation(vertical_presentation: VerticalPresentation) -> Self
set_horizontal_presentation
set_horizontal_presentation(horizontal_presentation: HorizontalPresentation) -> Self
copy
move_to
move_to(point: PointLike) -> Self
Move the text to a point.
This method modifies the text in place and returns itself.
Parameters:
-
point
(PointLike
) –Point to move the text to.
move_by
move_by(vector: PointLike) -> Self
Move the text by a vector.
This method modifies the text in place and returns itself.
Parameters:
-
vector
(PointLike
) –Vector to move the text by.
rotate
rotate(angle: float, centre: PointLike = Point(0, 0)) -> Self
Rotate the text by an angle around a centre point.
This method modifies the text 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 text by a factor around a centre point.
This method modifies the text 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
__str__
__repr__
VerticalPresentation
Source code in gdsr/_gdsr.pyi
values
staticmethod
values() -> list[VerticalPresentation]
HorizontalPresentation
Source code in gdsr/_gdsr.pyi
values
staticmethod
values() -> list[HorizontalPresentation]