Logo Search packages:      
Sourcecode: inkscape version File versions

CRStatement* cr_statement_new_at_font_face_rule ( CRStyleSheet a_sheet,
CRDeclaration a_font_decls 

Creates an instance of CRStatement of type CRAtFontFaceRule.

a_font_decls a list of instances of CRDeclaration. Each declaration is actually a font declaration.
the newly built instance of CRStatement.

Definition at line 1610 of file cr-statement.c.

References AT_FONT_FACE_RULE_STMT, cr_statement_set_parent_sheet(), and cr_utils_trace_info.

        CRStatement *result = (CRStatement *)g_try_malloc (sizeof (CRStatement));

        if (!result) {
                cr_utils_trace_info ("Out of memory");
                return NULL;
        memset (result, 0, sizeof (CRStatement));
        result->type = AT_FONT_FACE_RULE_STMT;

        result->kind.font_face_rule = (CRAtFontFaceRule *)g_try_malloc
                (sizeof (CRAtFontFaceRule));

        if (!result->kind.font_face_rule) {
                cr_utils_trace_info ("Out of memory");
                g_free (result);
                return NULL;
        memset (result->kind.font_face_rule, 0, sizeof (CRAtFontFaceRule));

        result->kind.font_face_rule->decl_list = a_font_decls;
        if (a_sheet)
                cr_statement_set_parent_sheet (result, a_sheet);

        return result;

Generated by  Doxygen 1.6.0   Back to index