Logo Search packages:      
Sourcecode: inkscape version File versions  Download package

CRStyleSheet* cr_stylesheet_new ( CRStatement a_stmts )

Constructor of the CRStyleSheet class.

Parameters:
theinitial list of css statements.
Returns:
the newly built css2 stylesheet, or NULL in case of error.

Definition at line 37 of file cr-stylesheet.c.

References cr_utils_trace_info, and _CRStyleSheet::statements.

{
        CRStyleSheet *result = (CRStyleSheet *)g_try_malloc (sizeof (CRStyleSheet));
        if (!result) {
                cr_utils_trace_info ("Out of memory");
                return NULL;
        }

        memset (result, 0, sizeof (CRStyleSheet));

        if (a_stmts)
                result->statements = a_stmts;

        return result;
}

Generated by  Doxygen 1.6.0   Back to index