1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
3 * cornerradius.cpp: CornerRadius parsing
6 * Moonlight List (moonlight-list@lists.ximian.com)
8 * Copyright 2007 Novell, Inc. (http://www.novell.com)
10 * See the LICENSE file included with the distribution for details.
21 #include "cornerradius.h"
24 CornerRadius::FromStr (const char *str
, CornerRadius
*corner
)
26 GArray
*values
= double_garray_from_str (str
, 0);
31 switch (values
->len
) {
33 *corner
= CornerRadius (g_array_index (values
, double, 0));
36 *corner
= CornerRadius (g_array_index (values
, double, 0),
37 g_array_index (values
, double, 1),
38 g_array_index (values
, double, 2),
39 g_array_index (values
, double, 3));
42 g_warning ("CornerRadius specified with %d values, '%s'.", values
->len
, str
);
48 g_array_free (values
, TRUE
);