Пример #1
0
/**
 * Virtual print callback.
 */
static void sp_root_print(SPItem *item, SPPrintContext *ctx)
{
    SPRoot *root = SP_ROOT(item);

    sp_print_bind(ctx, root->c2p, 1.0);

    if (((SPItemClass *) (parent_class))->print) {
        ((SPItemClass *) (parent_class))->print(item, ctx);
    }

    sp_print_release(ctx);
}
Пример #2
0
void SPUse::print(SPPrintContext* ctx) {
    bool translated = false;

    if ((this->x._set && this->x.computed != 0) || (this->y._set && this->y.computed != 0)) {
        Geom::Affine tp(Geom::Translate(this->x.computed, this->y.computed));
        sp_print_bind(ctx, tp, 1.0);
        translated = true;
    }

    if (this->child) {
        this->child->invoke_print(ctx);
    }

    if (translated) {
        sp_print_release(ctx);
    }
}