17 "title" :
"Sizing Mode",
18 "description" :
"Controls how an image is resized in the event that the dimensions are not evenly scaled.",
19 "keywords" : [
"resize",
"scale",
"fit",
"fill",
"stretch" ],
22 "VuoList_VuoSizingMode"
34 const char *valueAsString =
"";
35 if (json_object_get_type(js) == json_type_string)
36 valueAsString = json_object_get_string(js);
38 if (strcmp(valueAsString,
"fit") == 0)
39 return VuoSizingMode_Fit;
40 else if (strcmp(valueAsString,
"fill") == 0)
41 return VuoSizingMode_Fill;
42 else if (strcmp(valueAsString,
"proportional") == 0)
43 return VuoSizingMode_Proportional;
45 return VuoSizingMode_Stretch;
54 if (value == VuoSizingMode_Fit)
55 return json_object_new_string(
"fit");
56 else if (value == VuoSizingMode_Fill)
57 return json_object_new_string(
"fill");
58 else if (value == VuoSizingMode_Proportional)
59 return json_object_new_string(
"proportional");
61 return json_object_new_string(
"stretch");
83 if (value == VuoSizingMode_Fit)
85 else if (value == VuoSizingMode_Fill)
86 return strdup(
"Fill");
87 else if (value == VuoSizingMode_Proportional)
88 return strdup(
"Proportional");
90 return strdup(
"Stretch");