Vuo  2.4.0
VuoEdgeBlend.c
Go to the documentation of this file.
1
10#include "type.h"
11#include "VuoEdgeBlend.h"
12
14#ifdef VUO_COMPILER
16 "title" : "Edge Blend",
17 "description" : "Apply a fade and gamma curve to an edge.",
18 "keywords" : [ ],
19 "version" : "1.0.0",
20 "dependencies" : [
21 "VuoReal"
22 ]
23 });
24#endif
26
27
41{
42 return (VuoEdgeBlend){
43 VuoJson_getObjectValue(VuoReal, js, "cutoff", 0),
44 VuoJson_getObjectValue(VuoReal, js, "gamma", 1),
45 VuoJson_getObjectValue(VuoReal, js, "crop", 0)
46 };
47}
48
54{
55 json_object *js = json_object_new_object();
56
57 json_object *cutoffObject = VuoReal_getJson(value.cutoff);
58 json_object_object_add(js, "cutoff", cutoffObject);
59
60 json_object *gammaObject = VuoReal_getJson(value.gamma);
61 json_object_object_add(js, "gamma", gammaObject);
62
63 json_object *cropObject = VuoReal_getJson(value.crop);
64 json_object_object_add(js, "crop", cropObject);
65
66 return js;
67}
68
69
75{
76 return VuoText_format("Cutoff: %g, Gamma: %g Crop: %g", value.cutoff, value.gamma, value.crop);
77}