2
* cornerradius.cpp: CornerRadius parsing
5
* Moonlight List (moonlight-list@lists.ximian.com)
7
* Copyright 2007 Novell, Inc. (http://www.novell.com)
9
* See the LICENSE file included with the distribution for details.
19
#include "cornerradius.h"
22
CornerRadius::FromStr (const char *str, CornerRadius *corner)
24
GArray *values = double_garray_from_str (str, 4);
29
switch (values->len) {
31
*corner = CornerRadius (g_array_index (values, double, 0));
34
g_warning ("CornerRadius specified with 2 values, '%s'.", str);
38
g_warning ("CornerRadius specified with 3 values, '%s'.", str);
42
*corner = CornerRadius (g_array_index (values, double, 0),
43
g_array_index (values, double, 1),
44
g_array_index (values, double, 2),
45
g_array_index (values, double, 3));
50
g_array_free (values, TRUE);