TextAlias

Category

Font Utilities

Function

Smooths text for on-screen display..

Syntax


caption = LaTeXText(object, alias_factor, background);

Inputs

Name Type Default Description
object field none text object
alias_factor scalar 0.5 antialias factor (0-1)
background vector [0 ,0, 0] background colour

Outputs

Name Type Description
output color field antialiased object

Functional Details

The caption produced is aligned in parallel with the screen.

object input text object. At present this must be a LaTeX formatted text object. Standard opendx text objects have bizarre boundaries which result in surface defects when anti-aliased using this macro - this is either a bug or a feature!
alias_factor the antialias factor between 0.0 and 1.0. If this factor is x then a single pixel line of colour (1-x)b+(x)f is drawn around the text character boundaries, simulating antialiasing.
background background colour as a vector.

Notes:

  1. At present the input text must be a LaTeX formatted text object. Standard opendx text objects have bizarre boundaries which result in surface defects when anti-aliased using this macro - this is either a bug or a feature!
  2. The text background colour must be uniform over the text to be antialiased - TextAlias cannot at present adjust for colour changes in the background. However, if the background is largely of one colour you might get away with it.
  3. Because the antialiasing line is always precisely one pixel wide, the smaller the pixel height of text, the greater the relative amount of antialiasing - exactly as it should be.

Components

Creates "positions," "connections," and "colors" components.

Example Visual Programs

Many example visual programs use TextAlias, including:

Example.net

See Also

LaTeXText, LaTeXCaption, LaTeXFileCaption, LaTeXFileText