Vuo  2.3.2
Functions
VuoSceneText.c File Reference

Description

VuoSceneText implementation.

Definition in file VuoSceneText.c.

Go to the source code of this file.

Functions

static VuoMesh makeAnchoredQuad (VuoAnchor anchor)
 Create a new 4 point plane with positions set such that scaling will extend the mesh in the direction of anchor. More...
 
VuoSceneObject VuoSceneText_make (const VuoText text, const VuoFont font, const VuoBoolean scaleWithScene, const VuoReal wrapWidth, const VuoAnchor anchor)
 Creates a new VuoSceneObject set up with the correct font, shader, and mesh anchoring for text. More...
 
VuoAnchor VuoSceneText_getAnchor (VuoSceneObject so)
 Returns the anchor used when VuoSceneText_make was called. More...
 
VuoPoint2d VuoSceneText_getAnchorOffset (VuoSceneObject so, float verticalScale, float rotationZ, float wrapWidth, int viewportWidth, int backingScaleFactor)
 Returns the amount to translate the object to compensate for the anchor. More...
 

Function Documentation

◆ makeAnchoredQuad()

static VuoMesh makeAnchoredQuad ( VuoAnchor  anchor)
static

Create a new 4 point plane with positions set such that scaling will extend the mesh in the direction of anchor.

Creates a quad mesh anchored to the specified position.

Definition at line 32 of file VuoSceneText.c.

◆ VuoSceneText_getAnchor()

VuoAnchor VuoSceneText_getAnchor ( VuoSceneObject  so)

Returns the anchor used when VuoSceneText_make was called.

Changed in Vuo 2.0.0:
New.

Definition at line 107 of file VuoSceneText.c.

◆ VuoSceneText_getAnchorOffset()

VuoPoint2d VuoSceneText_getAnchorOffset ( VuoSceneObject  so,
float  verticalScale,
float  rotationZ,
float  wrapWidth,
int  viewportWidth,
int  backingScaleFactor 
)

Returns the amount to translate the object to compensate for the anchor.

Changed in Vuo 2.0.0:
New.

Definition at line 147 of file VuoSceneText.c.

◆ VuoSceneText_make()

VuoSceneObject VuoSceneText_make ( const VuoText  text,
const VuoFont  font,
const VuoBoolean  scaleWithScene,
const VuoReal  wrapWidth,
const VuoAnchor  anchor 
)

Creates a new VuoSceneObject set up with the correct font, shader, and mesh anchoring for text.

Parameters
textThe text to render.
fontThe font to render the text with.
scaleWithSceneIf true, the text scales when its part of the scenegraph, or the viewport, is scaled. If false, the text is rendered at a constant size.
wrapWidthThe width (in Vuo Coordinates) at which to wrap lines, or INFINITY to disable wrapping.
anchorThe position of the transform anchor.
Changed in Vuo 2.0.0:
Added scaleWithScene, wrapWidth arguments.

Definition at line 96 of file VuoSceneText.c.