print.cpp revision 7010515d8bdd21405e7427e0a961f7cc8fb2e702
/**
* \brief Print dialog
*
* Authors:
* Kees Cook <kees@outflux.net>
*
* Copyright (C) 2007 Kees Cook
*
* Released under GNU GPL. Read the file 'COPYING' for more information.
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#ifdef WIN32
#include <io.h>
#endif
#include "print.h"
#include "extension/internal/cairo-render-context.h"
#include "extension/internal/cairo-renderer.h"
#include "ui/widget/rendering-options.h"
#include "unit-constants.h"
#include "helper/png-write.h"
#include "svg/svg-color.h"
namespace Inkscape {
namespace UI {
namespace Dialog {
void
int page_nr)
{
// Render as exported PNG
int tmp_fd;
// This doesn't seem to work:
//context->set_cairo_context ( Cairo::Context::create (Cairo::ImageSurface::create_from_png (tmp_png) ), dpi, dpi );
//
// so we'll use a surface pattern blat instead...
//
// but the C++ interface isn't implemented in cairomm:
//context->get_cairo_context ()->set_source_surface(Cairo::ImageSurface::create_from_png (tmp_png) );
//
// so do it in C:
{
// FIXME: why is the origin offset??
}
// Clean up
}
else {
g_warning(_("Could not open temporary PNG for bitmap printing"));
}
}
else {
// Render as vectors
if (ret) {
if (ret) {
}
else {
g_warning(_("Could not set up Document"));
}
}
else {
g_warning(_("Failed to set CairoRenderContext"));
}
// Clean up
}
}
{
return &_tab;
}
void
{
g_warning (_("custom widget apply"));
}
_tab ()
{
// set up dialog title, based on document name
title += " ";
// set up paper size to match the document size
// build custom preferences tab
_printop->signal_create_custom_widget().connect(sigc::mem_fun(*this, &Print::_create_custom_widget));
// _printop->signal_custom_widget_apply().connect(sigc::mem_fun(*this, &Print::_custom_widget_apply));
// register actual page surface drawing callback
}
{
return res;
}
} // namespace Dialog
} // namespace UI
} // namespace Inkscape