KLayout Manual: Main Index » Class Index » API reference - Class DTextAPI reference - Class DTextNotation used in Ruby API documentation Description: A text object
A text object has a point (location), a text, a text transformation, a text size and a font id. Text size and font id are provided to be be able to render the text correctly. Public constructors
Public methods
Public static methods and constants
Deprecated methods (protected, public, static, non-static and constructors)
Detailed description[const] bool !=(const DText text)Description: Inequality Return true, if this text object and the given text are not equal [const] bool <(const DText t)Description: Less operator
This operator is provided to establish some, not necessarily a certain sorting order [const] bool ==(const DText text)Description: Equality Return true, if this text object and the given text are equal [const] void assign(const DText other)Description: Assign the contents of another object to self This method assigns the contents of another object to self. This is a deep copy that does not only copy the reference but the actual content. void createDescription: Ensures the C++ object is created Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created. void destroyDescription: Explicitly destroy the object Explicitly destroy the object on C++ side if it was owned by the Ruby interpreter. Subsequent access to this object will throw an exception. If the object is not owned by Ruby, this method will do nothing. [const] bool destroyed?Description: Returns a value indicating whether the object was already destroyed This method returns true, if the object was destroyed, either explicitly or by the C++ side. The latter may happen, if the object is owned by a C++ object which got destroyed itself. [const] DText dupDescription: Creates a copy of self int fontDescription: Get the font number void font=(int f)Description: Set the font number [static] DText from_itext(const Text double_text)Description: Construct an floating-point coordinate text object from an integer coordinate text int halignDescription: Get the horizontal alignment See halign= for a description of this property. void halign=(int a)Description: Set the horizontal alignment This property specifies how the text is aligned relative to the anchor point. Allowed values for this property are 0 (left), 1 (center) and 2 (right). This property has been introduced in version 0.22. [const] bool is_const_object?Description: Returns a value indicating whether the reference is a const reference This method returns true, if self is a const reference. In that case, only const methods may be called on self. DText move(const DPoint distance)Description: Moves the text by a certain distance
Moves the text by a given offset and returns the moved text. Does not check for coordinate overflows. DText moved(const DPoint distance)Description: Returns the text moved by a certain distance
Moves the text by a given offset and returns the moved text. Does not modify *this. Does not check for coordinate overflows. [static] new DText newDescription: Default constructor Creates a text with unit transformation and empty text. [static] new DText new(string string,const DTrans trans)Description: Constructor with string and transformation A string and a transformation is provided to this constructor. The transformation specifies the location and orientation of the text object. [static] new DText new(string string,const DTrans trans,double height,int font)Description: Constructor with string, transformation, text height and font A string and a transformation is provided to this constructor. The transformation specifies the location and orientation of the text object. In addition, the text height and font can be specified. [static] new DText new_st(string string,const DTrans trans)Description: Constructor with string and transformation This method is deprecated. Use method 'new' instead [static] new DText new_sthf(string string,const DTrans trans,double height,int font)Description: Constructor with string, transformation, text height and font This method is deprecated. Use method 'new' instead [const] double sizeDescription: Get the text height void size=(double s)Description: Set the text height of this object [const] string stringDescription: Get the text string void string=(string text)Description: Assign a text string to this object [const] string to_sDescription: Convert to a string [const] DTrans transDescription: Get the transformation void trans=(const DTrans t)Description: Assign a transformation (text position and orientation) to this object [const] DText transformed(const DTrans t)Description: Transform the text with the given simple transformation
[const] DText transformed_cplx(const DCplxTrans t)Description: Transform the text with the given complex transformation
int valignDescription: Get the vertical alignment See valign= for a description of this property. void valign=(int a)Description: Set the vertical alignment This property specifies how the text is aligned relative to the anchor point. Allowed values for this property are 0 (top), 1 (center) and 2 (bottom). This property has been introduced in version 0.22. |