Draw image and GTK
Posted: 2010-11-07T09:47:46-07:00
Hello,
if i use Image draw() after gtk_init() it failed with
Thanks for any help!
if i use Image draw() after gtk_init() it failed with
Before gtk_init Drawable works perfect.terminate called after throwing an instance of 'Magick::ErrorDraw'
what(): ImageMagick: Non-conforming drawing primitive definition `rectangle'
Thanks for any help!
Code: Select all
#include "gtk/gtk.h"
#include "gdk-pixbuf/gdk-pixbuf.h"
#include "Magick++.h"
using namespace std;
using namespace Magick;
void testbild()
{
Image image5( "400x400", "white" );
image5.strokeColor("red");
image5.fillColor("green");
image5.strokeWidth(5);
image5.draw(DrawableRectangle(200,200, 100,100));
image5.display( );
}
int main(int argc, char **argv)
{
testbild(); // OK
gtk_init (NULL, NULL);
testbild(); // failure
return 0;
}