Vuo
2.4.4
Loading...
Searching...
No Matches
node
vuo.layer
VuoEdgeBlend.c
Go to the documentation of this file.
1
10
#include "
VuoEdgeBlend.h
"
11
#include "
VuoReal.h
"
12
#include "
VuoText.h
"
13
15
#ifdef VUO_COMPILER
16
VuoModuleMetadata
({
17
"title"
:
"Edge Blend"
,
18
"description"
:
"Apply a fade and gamma curve to an edge."
,
19
"keywords"
: [ ],
20
"version"
:
"1.0.0"
,
21
"dependencies"
: [
22
"VuoReal"
23
]
24
});
25
#endif
27
28
41
VuoEdgeBlend
VuoEdgeBlend_makeFromJson
(json_object * js)
42
{
43
return
(
VuoEdgeBlend
){
44
VuoJson_getObjectValue
(
VuoReal
, js,
"cutoff"
, 0),
45
VuoJson_getObjectValue
(
VuoReal
, js,
"gamma"
, 1),
46
VuoJson_getObjectValue
(
VuoReal
, js,
"crop"
, 0)
47
};
48
}
49
54
json_object *
VuoEdgeBlend_getJson
(
const
VuoEdgeBlend
value)
55
{
56
json_object *js = json_object_new_object();
57
58
json_object *cutoffObject =
VuoReal_getJson
(value.cutoff);
59
json_object_object_add(js,
"cutoff"
, cutoffObject);
60
61
json_object *gammaObject =
VuoReal_getJson
(value.gamma);
62
json_object_object_add(js,
"gamma"
, gammaObject);
63
64
json_object *cropObject =
VuoReal_getJson
(value.crop);
65
json_object_object_add(js,
"crop"
, cropObject);
66
67
return
js;
68
}
69
70
75
char
*
VuoEdgeBlend_getSummary
(
const
VuoEdgeBlend
value)
76
{
77
return
VuoText_format
(
"Cutoff: %g, Gamma: %g Crop: %g"
, value.cutoff, value.gamma, value.crop);
78
}
Generated on Thu Nov 9 2023 16:59:30 for Vuo by
1.9.8