Vuo  2.0.0
Classes | Functions

Description

A 2D Object: visible (image), or virtual (group).

Classes

struct  VuoLayer
 A 2D Object: visible (image), or virtual (group). More...
 

Functions

VuoLayer VuoLayer_makeFromJson (json_object *js)
 
json_objectVuoLayer_getJson (const VuoLayer value)
 
char * VuoLayer_getSummary (const VuoLayer value)
 
VuoLayer VuoLayer_makeEmpty (void)
 Creates a new, empty layer. More...
 
VuoLayer VuoLayer_makeGroup (VuoList_VuoLayer childLayers, VuoTransform2d transform)
 Creates a layer with a group of child layers. More...
 
VuoLayer VuoLayer_makeGroup2 (VuoLayer layer1, VuoLayer layer2, VuoTransform2d transform)
 Creates a layer by combining two layers (layer1, then layer2). More...
 
VuoLayer VuoLayer_makeGroup3 (VuoLayer layer1, VuoLayer layer2, VuoLayer layer3, VuoTransform2d transform)
 Creates a layer by combining three layers. More...
 
VuoList_VuoLayer VuoLayer_getChildLayers (VuoLayer layer)
 Returns a list of this layer's child layers. More...
 
VuoLayer VuoLayer_make (VuoText name, VuoImage image, VuoPoint2d center, VuoReal rotation, VuoReal width, VuoReal alpha)
 Creates a visible layer that shows an image. More...
 
VuoLayer VuoLayer_makeWithTransform (VuoText name, VuoImage image, VuoTransform2d transform, VuoReal alpha)
 Creates a visible layer that shows an image. More...
 
VuoLayer VuoLayer_makeWithShadow (VuoText name, VuoImage image, VuoPoint2d center, VuoReal rotation, VuoReal width, VuoReal alpha, VuoColor shadowColor, VuoReal shadowBlur, VuoReal shadowAngle, VuoReal shadowDistance)
 Creates a visible layer with a shadow. More...
 
VuoLayer VuoLayer_makeRealSize (VuoText name, VuoImage image, VuoPoint2d center, VuoReal alpha, VuoBoolean preservePhysicalSize)
 Creates a visible layer that shows an image. More...
 
VuoLayer VuoLayer_makeRealSizeWithShadow (VuoText name, VuoImage image, VuoPoint2d center, VuoReal alpha, VuoBoolean preservePhysicalSize, VuoColor shadowColor, VuoReal shadowBlur, VuoReal shadowAngle, VuoReal shadowDistance)
 Creates a visible layer with a shadow. More...
 
VuoLayer VuoLayer_makeColor (VuoText name, VuoColor color, VuoPoint2d center, VuoReal rotation, VuoReal width, VuoReal height)
 Creates a rectangular layer with the specified color. More...
 
VuoLayer VuoLayer_makeOval (VuoText name, VuoColor color, VuoPoint2d center, VuoReal rotation, VuoReal width, VuoReal height, VuoReal sharpness)
 Creates an oval layer with the specified color. More...
 
VuoLayer VuoLayer_makeRoundedRectangle (VuoText name, VuoColor color, VuoPoint2d center, VuoReal rotation, VuoReal width, VuoReal height, VuoReal sharpness, VuoReal roundness)
 Creates a rounded rectangle layer with the specified color. More...
 
VuoLayer VuoLayer_makeCheckmark (VuoText name, VuoColor fillColor, VuoColor outlineColor, VuoReal outlineThickness, VuoPoint2d center, VuoReal rotation, VuoReal width, VuoReal height)
 Creates a layer with a checkmark of the specified color. More...
 
VuoLayer VuoLayer_makeLinearGradient (VuoText name, VuoList_VuoColor colors, VuoPoint2d start, VuoPoint2d end, VuoPoint2d center, VuoReal rotation, VuoReal width, VuoReal height, VuoReal noiseAmount)
 Creates a visible layer with a linear gradient. More...
 
VuoLayer VuoLayer_makeRadialGradient (VuoText name, VuoList_VuoColor colors, VuoPoint2d gradientCenter, VuoReal radius, VuoPoint2d center, VuoReal rotation, VuoReal width, VuoReal height, VuoReal noiseAmount)
 Creates a visible layer with a radial gradient. More...
 
uint64_t VuoLayer_getId (const VuoLayer layer)
 Returns the layer's identification number (unique among objects in the currently-running composition). More...
 
void VuoLayer_setId (VuoLayer layer, uint64_t id)
 Sets the layer's identification number (should be unique among objects in the currently-running composition). More...
 
VuoRectangle VuoLayer_getBoundingRectangle (VuoLayer layer, VuoInteger viewportWidth, VuoInteger viewportHeight, float backingScaleFactor)
 Returns the minimal rectangle enclosing the layer and its child layers. More...
 
VuoLayer VuoLayer_setAnchor (VuoLayer child, VuoAnchor anchor, VuoInteger viewportWidth, VuoInteger viewportHeight, float backingScaleFactor)
 Moves the pivot point of child by creating a parent layer and assigning child with an offset. More...
 
bool VuoLayer_isPopulated (VuoLayer layer)
 Returns true if the layer or any of its children have a non-empty type. More...
 
VuoLayer VuoLayer_makeFromString (const char *str)
 Automatically generated function. More...
 
char * VuoLayer_getString (const VuoLayer value)
 Automatically generated function. More...
 
void VuoLayer_retain (VuoLayer value)
 Automatically generated function. More...
 
void VuoLayer_release (VuoLayer value)
 Automatically generated function. More...
 

Class Documentation

◆ VuoLayer

struct VuoLayer
Class Members
void * l

Function Documentation

◆ VuoLayer_getBoundingRectangle()

VuoRectangle VuoLayer_getBoundingRectangle ( VuoLayer  layer,
VuoInteger  viewportWidth,
VuoInteger  viewportHeight,
float  backingScaleFactor 
)

Returns the minimal rectangle enclosing the layer and its child layers.

Definition at line 585 of file VuoLayer.c.

◆ VuoLayer_getChildLayers()

VuoList_VuoLayer VuoLayer_getChildLayers ( VuoLayer  layer)

Returns a list of this layer's child layers.

Definition at line 441 of file VuoLayer.c.

◆ VuoLayer_getId()

uint64_t VuoLayer_getId ( const VuoLayer  layer)

Returns the layer's identification number (unique among objects in the currently-running composition).

Changed in Vuo 2.0.0:
New.

Definition at line 422 of file VuoLayer.c.

◆ VuoLayer_getJson()

struct json_object * VuoLayer_getJson ( const VuoLayer  value)
See also
VuoSceneObject_getJson

Definition at line 611 of file VuoLayer.c.

◆ VuoLayer_getString()

char* VuoLayer_getString ( const VuoLayer  value)

Automatically generated function.

◆ VuoLayer_getSummary()

char * VuoLayer_getSummary ( const VuoLayer  value)
See also
VuoSceneObject_getSummary

Definition at line 620 of file VuoLayer.c.

◆ VuoLayer_isPopulated()

bool VuoLayer_isPopulated ( VuoLayer  layer)

Returns true if the layer or any of its children have a non-empty type.

Definition at line 593 of file VuoLayer.c.

◆ VuoLayer_make()

VuoLayer VuoLayer_make ( VuoText  name,
VuoImage  image,
VuoPoint2d  center,
VuoReal  rotation,
VuoReal  width,
VuoReal  alpha 
)

Creates a visible layer that shows an image.

Parameters
nameThe layer's name (used by, e.g., VuoRenderedLayers_findLayer).
imageThe image shown on the layer.
centerThe center of the layer, in Vuo Coordinates.
rotationThe layer's angle, in degrees.
widthThe width of the layer, in Vuo Coordinates.
alphaThe opacity of the layer, 0–1.

Definition at line 62 of file VuoLayer.c.

◆ VuoLayer_makeCheckmark()

VuoLayer VuoLayer_makeCheckmark ( VuoText  name,
VuoColor  fillColor,
VuoColor  outlineColor,
VuoReal  outlineThickness,
VuoPoint2d  center,
VuoReal  rotation,
VuoReal  width,
VuoReal  height 
)

Creates a layer with a checkmark of the specified color.

Parameters
nameThe layer's name (used by, e.g., VuoRenderedLayers_findLayer).
fillColorThe checkmark fill color.
outlineColorThe color of the checkmark's outline.
outlineThicknessThe thickness of the checkmark outline (0 to 0.1 make good values).
centerThe center of the layer, in Vuo Coordinates.
rotationThe layer's angle, in degrees.
widthThe width of the layer, in Vuo Coordinates.
heightThe height of the layer, in Vuo Coordinates.
Changed in Vuo 2.0.0:
New.

Definition at line 282 of file VuoLayer.c.

◆ VuoLayer_makeColor()

VuoLayer VuoLayer_makeColor ( VuoText  name,
VuoColor  color,
VuoPoint2d  center,
VuoReal  rotation,
VuoReal  width,
VuoReal  height 
)

Creates a rectangular layer with the specified color.

Parameters
nameThe layer's name (used by, e.g., VuoRenderedLayers_findLayer).
colorThe layer's color.
centerThe center of the layer, in Vuo Coordinates.
rotationThe layer's angle, in degrees.
widthThe width of the layer, in Vuo Coordinates.
heightThe height of the layer, in Vuo Coordinates.

Definition at line 230 of file VuoLayer.c.

◆ VuoLayer_makeEmpty()

VuoLayer VuoLayer_makeEmpty ( void  )

Creates a new, empty layer.

Definition at line 47 of file VuoLayer.c.

◆ VuoLayer_makeFromJson()

VuoLayer VuoLayer_makeFromJson ( json_object js)
See also
VuoSceneObject_makeFromJson

Definition at line 602 of file VuoLayer.c.

◆ VuoLayer_makeFromString()

VuoLayer VuoLayer_makeFromString ( const char *  str)

Automatically generated function.

◆ VuoLayer_makeGroup()

VuoLayer VuoLayer_makeGroup ( VuoList_VuoLayer  childLayers,
VuoTransform2d  transform 
)

Creates a layer with a group of child layers.

Definition at line 378 of file VuoLayer.c.

◆ VuoLayer_makeGroup2()

VuoLayer VuoLayer_makeGroup2 ( VuoLayer  layer1,
VuoLayer  layer2,
VuoTransform2d  transform 
)

Creates a layer by combining two layers (layer1, then layer2).

See also VuoLayer_makeGroup.

Changed in Vuo 2.0.0:
New.

Definition at line 393 of file VuoLayer.c.

◆ VuoLayer_makeGroup3()

VuoLayer VuoLayer_makeGroup3 ( VuoLayer  layer1,
VuoLayer  layer2,
VuoLayer  layer3,
VuoTransform2d  transform 
)

Creates a layer by combining three layers.

Layer1 is added first, then layer2, etc. See also VuoLayer_makeGroup.

Changed in Vuo 2.0.0:
New.

Definition at line 406 of file VuoLayer.c.

◆ VuoLayer_makeLinearGradient()

VuoLayer VuoLayer_makeLinearGradient ( VuoText  name,
VuoList_VuoColor  colors,
VuoPoint2d  start,
VuoPoint2d  end,
VuoPoint2d  center,
VuoReal  rotation,
VuoReal  width,
VuoReal  height,
VuoReal  noiseAmount 
)

Creates a visible layer with a linear gradient.

Parameters
nameThe layer's name (used by, e.g., VuoRenderedLayers_findLayer).
colorsThe layer's gradient colors.
startThe start point of the gradient, in Vuo Coordinates.
endThe end point of the gradient, in Vuo Coordinates.
centerThe center of the layer, in Vuo Coordinates.
rotationThe layer's angle, in degrees.
widthThe width of the layer, in Vuo Coordinates.
heightThe height of the layer, in Vuo Coordinates.
noiseAmountHow much random noise to add to the gradient. Typically between 0 and 1.

Definition at line 332 of file VuoLayer.c.

◆ VuoLayer_makeOval()

VuoLayer VuoLayer_makeOval ( VuoText  name,
VuoColor  color,
VuoPoint2d  center,
VuoReal  rotation,
VuoReal  width,
VuoReal  height,
VuoReal  sharpness 
)

Creates an oval layer with the specified color.

Parameters
nameThe layer's name (used by, e.g., VuoRenderedLayers_findLayer).
colorThe layer's color.
centerThe center of the layer, in Vuo Coordinates.
rotationThe layer's angle, in degrees.
widthThe width of the layer, in Vuo Coordinates.
heightThe height of the layer, in Vuo Coordinates.
sharpnessHow sharp the edge of the oval is, from 0 (blurry) to 1 (sharp).

Definition at line 254 of file VuoLayer.c.

◆ VuoLayer_makeRadialGradient()

VuoLayer VuoLayer_makeRadialGradient ( VuoText  name,
VuoList_VuoColor  colors,
VuoPoint2d  gradientCenter,
VuoReal  radius,
VuoPoint2d  center,
VuoReal  rotation,
VuoReal  width,
VuoReal  height,
VuoReal  noiseAmount 
)

Creates a visible layer with a radial gradient.

Parameters
nameThe layer's name (used by, e.g., VuoRenderedLayers_findLayer).
colorsThe layer's gradient colors.
gradientCenterThe center point of the gradient, in Vuo Coordinates.
radiusThe radius of the gradient, in Vuo Coordinates.
centerThe center of the layer, in Vuo Coordinates.
rotationThe layer's angle, in degrees.
widthThe width of the layer, in Vuo Coordinates.
heightThe height of the layer, in Vuo Coordinates.
noiseAmountHow much random noise to add to the gradient. Typically between 0 and 1.

Definition at line 360 of file VuoLayer.c.

◆ VuoLayer_makeRealSize()

VuoLayer VuoLayer_makeRealSize ( VuoText  name,
VuoImage  image,
VuoPoint2d  center,
VuoReal  alpha,
VuoBoolean  preservePhysicalSize 
)

Creates a visible layer that shows an image.

The layer is the exact pixel-perfect size of the image (regardless of transform), and the position is quantized so edges land on whole pixels.

Parameters
nameThe layer's name (used by, e.g., VuoRenderedLayers_findLayer).
imageThe image shown on the layer.
centerThe center of the layer, in Vuo Coordinates.
alphaThe opacity of the layer, 0–1.
preservePhysicalSizeSee VuoSceneObject_shouldPreservePhysicalSize.

Definition at line 101 of file VuoLayer.c.

◆ VuoLayer_makeRealSizeWithShadow()

VuoLayer VuoLayer_makeRealSizeWithShadow ( VuoText  name,
VuoImage  image,
VuoPoint2d  center,
VuoReal  alpha,
VuoBoolean  preservePhysicalSize,
VuoColor  shadowColor,
VuoReal  shadowBlur,
VuoReal  shadowAngle,
VuoReal  shadowDistance 
)

Creates a visible layer with a shadow.

The layer is the exact pixel-perfect size of the image (regardless of transform), and the position is quantized so edges land on whole pixels.

Parameters
nameThe layer's name (used by, e.g., VuoRenderedLayers_findLayer).
imageThe image shown on the layer.
centerThe center of the layer, in Vuo Coordinates.
alphaThe opacity of the layer, 0–1.
preservePhysicalSizeSee VuoSceneObject_shouldPreservePhysicalSize.
shadowColorThe color of the layer's shadow.
shadowBlurThe amount to blur the layer's shadow, in pixels.
shadowAngleThe angle of the layer's shadow, in degrees.
shadowDistanceThe distance that the shadow is offset from the layer, in Vuo Coordinates.

Definition at line 215 of file VuoLayer.c.

◆ VuoLayer_makeRoundedRectangle()

VuoLayer VuoLayer_makeRoundedRectangle ( VuoText  name,
VuoColor  color,
VuoPoint2d  center,
VuoReal  rotation,
VuoReal  width,
VuoReal  height,
VuoReal  sharpness,
VuoReal  roundness 
)

Creates a rounded rectangle layer with the specified color.

Parameters
nameThe layer's name (used by, e.g., VuoRenderedLayers_findLayer).
colorThe layer's color.
centerThe center of the layer, in Vuo Coordinates.
rotationThe layer's angle, in degrees.
widthThe width of the layer, in Vuo Coordinates.
heightThe height of the layer, in Vuo Coordinates.
sharpnessHow sharp the edges of the rectangle are, from 0 (blurry) to 1 (sharp).
roundnessHow round the corners of the rectangle are, from 0 (rectangular) to 1 (circular / capsular).

Definition at line 306 of file VuoLayer.c.

◆ VuoLayer_makeWithShadow()

VuoLayer VuoLayer_makeWithShadow ( VuoText  name,
VuoImage  image,
VuoPoint2d  center,
VuoReal  rotation,
VuoReal  width,
VuoReal  alpha,
VuoColor  shadowColor,
VuoReal  shadowBlur,
VuoReal  shadowAngle,
VuoReal  shadowDistance 
)

Creates a visible layer with a shadow.

Parameters
nameThe layer's name (used by, e.g., VuoRenderedLayers_findLayer).
imageThe image shown on the layer.
centerThe center of the layer, in Vuo Coordinates.
rotationThe layer's angle, in degrees.
widthThe width of the layer, in Vuo Coordinates.
alphaThe opacity of the layer, 0–1.
shadowColorThe color of the layer's shadow.
shadowBlurThe amount to blur the layer's shadow, in pixels.
shadowAngleThe angle of the layer's shadow, in degrees.
shadowDistanceThe distance that the shadow is offset from the layer, in Vuo Coordinates.

Definition at line 195 of file VuoLayer.c.

◆ VuoLayer_makeWithTransform()

VuoLayer VuoLayer_makeWithTransform ( VuoText  name,
VuoImage  image,
VuoTransform2d  transform,
VuoReal  alpha 
)

Creates a visible layer that shows an image.

Parameters
nameThe layer's name (used by, e.g., VuoRenderedLayers_findLayer).
imageThe image shown on the layer.
transformThe 2d transform that specifies translation, rotation, and scale relative to this layer's parent.
alphaThe opacity of the layer, 0–1.

Definition at line 79 of file VuoLayer.c.

◆ VuoLayer_release()

void VuoLayer_release ( VuoLayer  value)

Automatically generated function.

◆ VuoLayer_retain()

void VuoLayer_retain ( VuoLayer  value)

Automatically generated function.

◆ VuoLayer_setAnchor()

VuoLayer VuoLayer_setAnchor ( VuoLayer  child,
VuoAnchor  anchor,
VuoInteger  viewportWidth,
VuoInteger  viewportHeight,
float  backingScaleFactor 
)

Moves the pivot point of child by creating a parent layer and assigning child with an offset.

If anchor is { Center, Center } the unmodified layer is returned.

Definition at line 543 of file VuoLayer.c.

◆ VuoLayer_setId()

void VuoLayer_setId ( VuoLayer  layer,
uint64_t  id 
)

Sets the layer's identification number (should be unique among objects in the currently-running composition).

Changed in Vuo 2.0.0:
New.

Definition at line 433 of file VuoLayer.c.