MasterScan  Lab_Matlab_control Master Branch
List of all members | Properties and Events | Protected Properties | Methods | Static Methods
dotsDrawableText Class Reference

Overview

Display a string graphically.

Displays text by converting string into a texture. Invoke prepareToDrawInWindow() after changing properties like string, color and fontName

Inheritance diagram for dotsDrawableText:
Inheritance graph
[legend]

Properties and Events

Property x = 0
 x-coordinate for the center of the text (degrees visual angle, centered in window)
 
Property y = 0
 y-coordinate for the center of the text (degrees visual angle, centered in window)
 
Property string = ''
 string to render as graphical text
 
Property color = [255 255 255]
 [RGB] color of the displayed text
 
Property rotation = 0
 degrees counterclockwise to rotate the entire text
 
Property isFlippedHorizontal = false
 wheter or not to flip the text horizontally
 
Property isFlippedVertical = false
 wheter or not to flip the text vertically
 
Property typefaceName = 'Helvetica'
 string name of the typeface to render
 
Property fontSize = 64
 point size of the font to render
 
Property isBold = false
 whether or not to render the font in bold
 
Property isItalic = false
 whether or not to render the font with emphasis
 
Property isUnderline = false
 whether or not to render the font with an a line under it
 
Property isStrikethrough = false
 whether or not to render the font with a line through it
 
- Properties and Events inherited from dotsDrawable
Property isVisible = true
 true or false, whether to draw() this object
 

Protected Properties

Property textureInfo
 struct of information about the text's OpenGL texture
 
Property isTextureStale = true
 whether or not the OpenGL texture needs updating
 

Methods

self dotsDrawableText ()
 Constructor takes no arguments.
 
 set_typefaceName (self, typefaceName)
 Keep track of required texture updates.
 
 set_fontSize (self, fontSize)
 Keep track of required texture updates.
 
 set_color (self, color)
 Keep track of required texture updates.
 
 set_isFlippedHorizontal (self, isFlippedHorizontal)
 Keep track of required texture updates.
 
 set_isFlippedVertical (self, isFlippedVertical)
 Keep track of required texture updates.
 
 set_isBold (self, isBold)
 Keep track of required texture updates.
 
 set_isItalic (self, isItalic)
 Keep track of required texture updates.
 
 set_isUnderline (self, isUnderline)
 Keep track of required texture updates.
 
 set_isStrikethrough (self, isStrikethrough)
 Keep track of required texture updates.
 
 set_string (self, string)
 Keep track of required texture updates.
 
 prepareToDrawInWindow (self)
 Prepare the text texture to be drawn.
 
 draw (self)
 Draw the text string, centered on x and y.
 
- Methods inherited from dotsDrawable
self dotsDrawable ()
 Constructor takes no arguments.
 
 prepareToDrawInWindow (self)
 Do any pre-draw setup that requires an OpenGL drawing window.
 
 mayDrawNow (self)
 Draw() or not, depending on isVisible and possibly other factors.
 
 draw (self)
 Subclass must redefine draw() to draw graphics.
 
 show (self)
 Shorthand to set isVisible=true.
 
 hide (self)
 Shorthand to set isVisible=false.
 

Static Methods

static ensemble makeEnsemble (name, numTexts, spacing)
 function ensemble = makeEnsemble(name, num, yOffset) More...
 
static frameInfo drawEnsemble (textEnsemble, textStrings, spacing, showDuration, pauseDuration)
 Utility to show text strings using the given ensemble. More...
 
static showText (text, varargin)
 Utility for showing text on the current screen.
 
- Static Methods inherited from dotsDrawable
static frameInfo drawFrame (drawables, doClear)
 draw() several drawable objects and show the next Screen frame. More...
 
static ensemble makeEnsemble (name, objects)
 Convenient utility for combining a bunch of drawables into an ensemble. More...
 
static frameInfo drawEnsemble (ensemble, args, prepareFlag, showDuration, pauseDuration)
 Convenient utility for drawing an ensemble either locally or remotely. More...
 

Methods

◆ makeEnsemble()

static ensemble makeEnsemble ( name  ,
numTexts  ,
spacing   
)
static

function ensemble = makeEnsemble(name, num, yOffset)

Convenient utility for combining a bunch of dotsDrawableText objects that will show vertically positioned strings into an ensemble Aguments: name ... optional <string> name of the ensemble/composite numTexts ... number of text objects to make spacing ... vertical separation beween text strings on the screen

◆ drawEnsemble()

static frameInfo drawEnsemble ( textEnsemble  ,
textStrings  ,
spacing  ,
showDuration  ,
pauseDuration   
)
static

Utility to show text strings using the given ensemble.

Inputs: textEnsemble ... topsEnsemble holding the text object(s) textStrings ... cell array of strings; any can be empty to skip. rows are done in separate screens columns should correspond to the # of text objects in the ensemble to show at once defaultSpacing ... space along y axis showDuration ... Time (in sec) to show the text pauseDuration ... Time (in sec) to pause after showing the text


The documentation for this class was generated from the following file: