Пример #1
0
cairo_pattern_t *sp_paint_server_create_pattern(SPPaintServer *ps,
                                                cairo_t *ct,
                                                Geom::OptRect const &bbox,
                                                double opacity)
{
    g_return_val_if_fail(ps != NULL, NULL);
    g_return_val_if_fail(SP_IS_PAINT_SERVER(ps), NULL);

    cairo_pattern_t *cp = NULL;
    SPPaintServerClass *psc = (SPPaintServerClass *) G_OBJECT_GET_CLASS(ps);
    if ( psc->pattern_new ) {
        cp = (*psc->pattern_new)(ps, ct, bbox, opacity);
    }

    return cp;
}
Пример #2
0
bool SPPaintServerReference::_acceptObject(SPObject *obj) const
{
    return SP_IS_PAINT_SERVER(obj);
}