index 5ccb6c7fac2533d68fd1754840ea5c5a9df93a0e..d3fe2771ff8d07970153b3b1427879a0d08a0977 100644 (file)
--- a/src/helper/png-write.cpp
+++ b/src/helper/png-write.cpp
-#define __SP_PNG_WRITE_C__
-
/*
* PNG file format utilities
*
* Authors:
* Lauris Kaplinski <lauris@kaplinski.com>
* Whoever wrote this example in libpng documentation
+ * Jon A. Cruz <jon@joncruz.org>
+ * Abhishek Sharma
*
* Copyright (C) 1999-2002 authors
*
/**
* Hide all items that are not listed in list, recursively, skipping groups and defs.
*/
-static void
-hide_other_items_recursively(SPObject *o, GSList *list, unsigned dkey)
+static void hide_other_items_recursively(SPObject *o, GSList *list, unsigned dkey)
{
if ( SP_IS_ITEM(o)
&& !SP_IS_DEFS(o)
// recurse
if (!g_slist_find(list, o)) {
- for (SPObject *child = o->first_child() ; child != NULL; child = SP_OBJECT_NEXT(child) ) {
+ for ( SPObject *child = o->firstChild() ; child; child = child->getNext() ) {
hide_other_items_recursively(child, list, dkey);
}
}
return true;
}
- doc->ensure_up_to_date();
+ doc->ensureUpToDate();
/* Calculate translation by transforming to document coordinates (flipping Y)*/
Geom::Point translation = Geom::Point(-area[Geom::X][0], area[Geom::Y][1] - doc->getHeight());
unsigned const dkey = SPItem::display_key_new(1);
/* Create ArenaItems and set transform */
- ebp.root = SP_ITEM(sp_document_root(doc))->invoke_show(arena, dkey, SP_ITEM_SHOW_DISPLAY);
+ ebp.root = SP_ITEM(doc->getRoot())->invoke_show(arena, dkey, SP_ITEM_SHOW_DISPLAY);
nr_arena_item_set_transform(NR_ARENA_ITEM(ebp.root), affine);
// We show all and then hide all items we don't want, instead of showing only requested items,
// because that would not work if the shown item references something in defs
if (items_only) {
- hide_other_items_recursively(sp_document_root(doc), items_only, dkey);
+ hide_other_items_recursively(doc->getRoot(), items_only, dkey);
}
ebp.status = status;
}
// Hide items, this releases arenaitem
- SP_ITEM(sp_document_root(doc))->invoke_hide(dkey);
+ SP_ITEM(doc->getRoot())->invoke_hide(dkey);
/* Free arena */
nr_object_unref((NRObject *) arena);
fill-column:99
End:
*/
-// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :