imagemagick.cpp revision 7cbbfa267f06016a7a5865c4132e6eaabef46f49
/*
* Authors:
* Christopher Brown <audiere@gmail.com>
* Ted Gould <ted@gould.cx>
*
* Copyright (C) 2007 Authors
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include <libintl.h>
#include <gtkmm/adjustment.h>
#include <gtkmm/spinbutton.h>
#include "desktop.h"
#include "selection.h"
#include "sp-object.h"
#include "util/glib-list-iterators.h"
#include "imagemagick.h"
#include <Magick++.h>
namespace Inkscape {
namespace Extension {
namespace Internal {
namespace Bitmap {
class ImageMagickDocCache: public Inkscape::Extension::Implementation::ImplementationDocumentCache {
friend class ImageMagick;
private:
protected:
int _imageCount;
char** _caches;
unsigned* _cacheLengths;
const char** _originals;
public:
~ImageMagickDocCache ( );
};
_imageCount(0),
{
// Init the data-holders
_originals = new const char*[selectCount];
_caches = new char*[selectCount];
_cacheLengths = new unsigned int[selectCount];
_imageCount = 0;
// Loop through selected items
for (std::vector<SPItem*>::const_iterator i = selectedItemList.begin(); i != selectedItemList.end(); ++i) {
{
_cacheLengths[_imageCount] = 0;
_imageCount++;
}
}
}
if (_nodes)
delete _nodes;
if (_originals)
delete _originals;
if (_caches)
delete _caches;
if (_cacheLengths)
delete _cacheLengths;
if (_images)
delete _images;
if (_imageItems)
delete _imageItems;
return;
}
void
{
// Find if the xlink:href is base64 data, i.e. if the image is embedded
// 7 = strlen("base64") + strlen(",")
}
else {
}
try {
} catch (...) {}
}
}
bool
{
return true;
}
ImageMagick::newDocCache (Inkscape::Extension::Extension * /*ext*/, Inkscape::UI::View::View * view) {
return new ImageMagickDocCache(view);
}
void
ImageMagick::effect (Inkscape::Extension::Effect *module, Inkscape::UI::View::View *document, Inkscape::Extension::Implementation::ImplementationDocumentCache * docCache)
{
}
printf("AHHHHHHHHH!!!!!");
exit(1);
}
for (int i = 0; i < dc->_imageCount; i++)
{
try
{
// postEffect can be used to change things on the item itself
// e.g. resize the image element, after the effecti is applied
// dc->_nodes[i]->setAttribute("xlink:href", dc->_caches[i], true);
}
const char *src;
*formatted_i++ = *src++;
*formatted_i++ = *src++;
*formatted_i++ = *src++;
int col = 0;
while (*raw_i) {
*formatted_i++ = *raw_i++;
if (col++ > 76) {
*formatted_i++ = '\n';
col = 0;
}
}
if (col) {
*formatted_i++ = '\n';
}
*formatted_i = '\0';
}
}
//while(Gtk::Main::events_pending()) {
// Gtk::Main::iteration();
//}
}
}
/** \brief A function to get the prefences for the grid
\param moudule Module which holds the params
\param view Unused today - may get style information in the future.
Uses AutoGUI for creating the GUI.
*/
ImageMagick::prefs_effect(Inkscape::Extension::Effect *module, Inkscape::UI::View::View * view, sigc::signal<void> * changeSignal, Inkscape::Extension::Implementation::ImplementationDocumentCache * /*docCache*/)
{
}
}
}; /* namespace Bitmap */
}; /* namespace Internal */
}; /* namespace Extension */
}; /* namespace Inkscape */