draftmake.make_text Namespace Reference

Functions

def make_text (string, placement=None, screen=False)
 
def makeText (stringlist, point=App.Vector(0, 0, 0), screen=False)
 

Function Documentation

◆ make_text()

def draftmake.make_text.make_text (   string,
  placement = None,
  screen = False 
)
Create a Text object containing the given list of strings.

The current color and text height and font specified in preferences
are used.

Parameters
----------
string: str, or list of str
    String to display on screen.

    If it is a list, each element in the list should be a string.
    In this case each element will be printed in its own line, that is,
    a newline will be added at the end of each string.

    If an empty string is passed `''` this won't cause an error
    but the text `'Label'` will be displayed in the 3D view.

placement: Base::Placement, Base::Vector3, or Base::Rotation, optional
    It defaults to `None`.
    If it is provided, it is the placement of the new text.
    The input could be a full placement, just a vector indicating
    the translation, or just a rotation.

screen: bool, optional
    It defaults to `False`, in which case the text is placed in 3D space
    oriented like any other object, on top of a given plane,
    by the default the XY plane.
    If it is `True`, the text will always face perpendicularly
    to the camera direction, that is, it will be flat on the screen.

Returns
-------
App::FeaturePython
    A scripted object of type `'Text'`.
    This object does not have a `Shape` attribute, as the text is created
    on screen by Coin (pivy).

None
    If there is a problem it will return `None`.

◆ makeText()

def draftmake.make_text.makeText (   stringlist,
  point = App.Vector(0, 0, 0),
  screen = False 
)
Create Text. DEPRECATED. Use 'make_text'.