Vuo
2.3.0
|
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_object * | VuoLayer_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 size, VuoOrientation fixed, 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... | |
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 586 of file VuoLayer.c.
VuoList_VuoLayer VuoLayer_getChildLayers | ( | VuoLayer | layer | ) |
Returns a list of this layer's child layers.
Definition at line 442 of file VuoLayer.c.
uint64_t VuoLayer_getId | ( | const VuoLayer | layer | ) |
Returns the layer's identification number (unique among objects in the currently-running composition).
Definition at line 423 of file VuoLayer.c.
struct json_object * VuoLayer_getJson | ( | const VuoLayer | value | ) |
Definition at line 612 of file VuoLayer.c.
char* VuoLayer_getString | ( | const VuoLayer | value | ) |
Automatically generated function.
char * VuoLayer_getSummary | ( | const VuoLayer | value | ) |
Definition at line 621 of file VuoLayer.c.
bool VuoLayer_isPopulated | ( | VuoLayer | layer | ) |
Returns true if the layer or any of its children have a non-empty type.
Definition at line 594 of file VuoLayer.c.
VuoLayer VuoLayer_make | ( | VuoText | name, |
VuoImage | image, | ||
VuoPoint2d | center, | ||
VuoReal | rotation, | ||
VuoReal | size, | ||
VuoOrientation | fixed, | ||
VuoReal | alpha | ||
) |
Creates a visible layer that shows an image.
name | The layer's name (used by, e.g., VuoRenderedLayers_findLayer). |
image | The image shown on the layer. |
center | The center of the layer, in Vuo Coordinates. |
rotation | The layer's angle, in degrees. |
size | The width or height of the layer, in Vuo Coordinates. |
fixed | Whether size specifies width or height. |
alpha | The opacity of the layer, 0–1. |
Definition at line 63 of file VuoLayer.c.
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.
name | The layer's name (used by, e.g., VuoRenderedLayers_findLayer). |
fillColor | The checkmark fill color. |
outlineColor | The color of the checkmark's outline. |
outlineThickness | The thickness of the checkmark outline (0 to 0.1 make good values). |
center | The center of the layer, in Vuo Coordinates. |
rotation | The layer's angle, in degrees. |
width | The width of the layer, in Vuo Coordinates. |
height | The height of the layer, in Vuo Coordinates. |
Definition at line 283 of file VuoLayer.c.
VuoLayer VuoLayer_makeColor | ( | VuoText | name, |
VuoColor | color, | ||
VuoPoint2d | center, | ||
VuoReal | rotation, | ||
VuoReal | width, | ||
VuoReal | height | ||
) |
Creates a rectangular layer with the specified color.
name | The layer's name (used by, e.g., VuoRenderedLayers_findLayer). |
color | The layer's color. |
center | The center of the layer, in Vuo Coordinates. |
rotation | The layer's angle, in degrees. |
width | The width of the layer, in Vuo Coordinates. |
height | The height of the layer, in Vuo Coordinates. |
Definition at line 231 of file VuoLayer.c.
VuoLayer VuoLayer_makeEmpty | ( | void | ) |
Creates a new, empty layer.
Definition at line 47 of file VuoLayer.c.
VuoLayer VuoLayer_makeFromJson | ( | json_object * | js | ) |
Definition at line 603 of file VuoLayer.c.
VuoLayer VuoLayer_makeFromString | ( | const char * | str | ) |
Automatically generated function.
VuoLayer VuoLayer_makeGroup | ( | VuoList_VuoLayer | childLayers, |
VuoTransform2d | transform | ||
) |
Creates a layer with a group of child layers.
Definition at line 379 of file VuoLayer.c.
VuoLayer VuoLayer_makeGroup2 | ( | VuoLayer | layer1, |
VuoLayer | layer2, | ||
VuoTransform2d | transform | ||
) |
Creates a layer by combining two layers (layer1, then layer2).
See also VuoLayer_makeGroup.
Definition at line 394 of file VuoLayer.c.
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.
Definition at line 407 of file VuoLayer.c.
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.
name | The layer's name (used by, e.g., VuoRenderedLayers_findLayer). |
colors | The layer's gradient colors. |
start | The start point of the gradient, in Vuo Coordinates. |
end | The end point of the gradient, in Vuo Coordinates. |
center | The center of the layer, in Vuo Coordinates. |
rotation | The layer's angle, in degrees. |
width | The width of the layer, in Vuo Coordinates. |
height | The height of the layer, in Vuo Coordinates. |
noiseAmount | How much random noise to add to the gradient. Typically between 0 and 1. |
Definition at line 333 of file VuoLayer.c.
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.
name | The layer's name (used by, e.g., VuoRenderedLayers_findLayer). |
color | The layer's color. |
center | The center of the layer, in Vuo Coordinates. |
rotation | The layer's angle, in degrees. |
width | The width of the layer, in Vuo Coordinates. |
height | The height of the layer, in Vuo Coordinates. |
sharpness | How sharp the edge of the oval is, from 0 (blurry) to 1 (sharp). |
Definition at line 255 of file VuoLayer.c.
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.
name | The layer's name (used by, e.g., VuoRenderedLayers_findLayer). |
colors | The layer's gradient colors. |
gradientCenter | The center point of the gradient, in Vuo Coordinates. |
radius | The radius of the gradient, in Vuo Coordinates. |
center | The center of the layer, in Vuo Coordinates. |
rotation | The layer's angle, in degrees. |
width | The width of the layer, in Vuo Coordinates. |
height | The height of the layer, in Vuo Coordinates. |
noiseAmount | How much random noise to add to the gradient. Typically between 0 and 1. |
Definition at line 361 of file VuoLayer.c.
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.
name | The layer's name (used by, e.g., VuoRenderedLayers_findLayer). |
image | The image shown on the layer. |
center | The center of the layer, in Vuo Coordinates. |
alpha | The opacity of the layer, 0–1. |
preservePhysicalSize | See VuoSceneObject_shouldPreservePhysicalSize. |
Definition at line 102 of file VuoLayer.c.
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.
name | The layer's name (used by, e.g., VuoRenderedLayers_findLayer). |
image | The image shown on the layer. |
center | The center of the layer, in Vuo Coordinates. |
alpha | The opacity of the layer, 0–1. |
preservePhysicalSize | See VuoSceneObject_shouldPreservePhysicalSize. |
shadowColor | The color of the layer's shadow. |
shadowBlur | The amount to blur the layer's shadow, in pixels. |
shadowAngle | The angle of the layer's shadow, in degrees. |
shadowDistance | The distance that the shadow is offset from the layer, in Vuo Coordinates. |
Definition at line 216 of file VuoLayer.c.
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.
name | The layer's name (used by, e.g., VuoRenderedLayers_findLayer). |
color | The layer's color. |
center | The center of the layer, in Vuo Coordinates. |
rotation | The layer's angle, in degrees. |
width | The width of the layer, in Vuo Coordinates. |
height | The height of the layer, in Vuo Coordinates. |
sharpness | How sharp the edges of the rectangle are, from 0 (blurry) to 1 (sharp). |
roundness | How round the corners of the rectangle are, from 0 (rectangular) to 1 (circular / capsular). |
Definition at line 307 of file VuoLayer.c.
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.
name | The layer's name (used by, e.g., VuoRenderedLayers_findLayer). |
image | The image shown on the layer. |
center | The center of the layer, in Vuo Coordinates. |
rotation | The layer's angle, in degrees. |
width | The width of the layer, in Vuo Coordinates. |
alpha | The opacity of the layer, 0–1. |
shadowColor | The color of the layer's shadow. |
shadowBlur | The amount to blur the layer's shadow, in pixels. |
shadowAngle | The angle of the layer's shadow, in degrees. |
shadowDistance | The distance that the shadow is offset from the layer, in Vuo Coordinates. |
Definition at line 196 of file VuoLayer.c.
VuoLayer VuoLayer_makeWithTransform | ( | VuoText | name, |
VuoImage | image, | ||
VuoTransform2d | transform, | ||
VuoReal | alpha | ||
) |
Creates a visible layer that shows an image.
name | The layer's name (used by, e.g., VuoRenderedLayers_findLayer). |
image | The image shown on the layer. |
transform | The 2d transform that specifies translation, rotation, and scale relative to this layer's parent. |
alpha | The opacity of the layer, 0–1. |
Definition at line 80 of file VuoLayer.c.
void VuoLayer_release | ( | VuoLayer | value | ) |
Automatically generated function.
void VuoLayer_retain | ( | VuoLayer | value | ) |
Automatically generated function.
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 544 of file VuoLayer.c.
void VuoLayer_setId | ( | VuoLayer | layer, |
uint64_t | id | ||
) |
Sets the layer's identification number (should be unique among objects in the currently-running composition).
Definition at line 434 of file VuoLayer.c.