Link Search Menu Expand Document

Class Text

About :

A Text is a graphic node visualizing a text which may be editable or not. Text

Class diagram of class of Text.

Functions

Function summury
__init__(self, obj=None, text=’Hello world’, font=None, has_cursor=True, content_max_size=None) Create a Text graphic node. (more…)
set_diffuse_color(self, r, g, b, a)  
set_type(self, texttype=0)  
set_single_line(self, single=True)  
is_single_line(self)  
get_type(self)  
set_font(self, font=None)  
set_max_compile_size(self, compile_max_size)  
set_text(self, text=’’, update=True, add_cursor=0)  
get_text(self)  
set_editable(self, editable=True)  
get_vertex_faces(self, ni=0)  
get_face_vertices(self, nf=0)  
get_vertex_coordinates(self, ni)  
get_vertex_normal(self, ni=0)  
get_face_char_index(self, nf=0) A function which returns the string index char corresponding (more…)
get_face_number(self)  
get_vertex_number(self)  
bounding_box(self)  
set_layout(self)  
get_textures(self)  
compile(self, data, faces) complete the given numpy tables with data of the current node (more…)
on_shot(self, device=None, picked={})  
on_keyboard(self, window, key, ukey, ctrl=False, shift=False, alt=False, cmd=False, meta=False)  
on_keyboard_release(self, window)  

Methods desciption :

init

def __init__(self, obj=None, text='Hello world', font=None, has_cursor=True, content_max_size=None)

Create a Text graphic node.

  • → obj : any python object as reference key of application node
  • → text : unicode text to be displayed
  • → font : OGLFont to be used

set_diffuse_color

def set_diffuse_color(self, r, g, b, a)

set_type

def set_type(self, texttype=0)

set_single_line

def set_single_line(self, single=True)

is_single_line

def is_single_line(self)

get_type

def get_type(self)

set_font

def set_font(self, font=None)

set_max_compile_size

def set_max_compile_size(self, compile_max_size)

set_text

def set_text(self, text='', update=True, add_cursor=0)

get_text

def get_text(self)

set_editable

def set_editable(self, editable=True)

get_vertex_faces

def get_vertex_faces(self, ni=0)

get_face_vertices

def get_face_vertices(self, nf=0)

get_vertex_coordinates

def get_vertex_coordinates(self, ni)

get_vertex_normal

def get_vertex_normal(self, ni=0)

get_face_char_index

def get_face_char_index(self, nf=0)

A function which returns the string index char corresponding

  • → nf : face index of the graphic representation of the string
  • ←s char index within the string

get_face_number

def get_face_number(self)

get_vertex_number

def get_vertex_number(self)

bounding_box

def bounding_box(self)

set_layout

def set_layout(self)

get_textures

def get_textures(self)

compile

def compile(self, data, faces)

complete the given numpy tables with data of the current node

on_shot

def on_shot(self, device=None, picked={})

on_keyboard

def on_keyboard(self, window, key, ukey, ctrl=False, shift=False, alt=False, cmd=False, meta=False)

on_keyboard_release

def on_keyboard_release(self, window)