The following code:
Code: Select all
#define WIDTH 4000
#define HEIGHT 3000
void mwtest(void)
{
MagickWand *image;
PixelWand *colour;
DrawingWand *drawing;
PointInfo ptest[5] = {{1000, 750}, {3000, 750}, {3000, 2250}, {1000, 2250}, {1000, 750}};
MagickWandGenesis();
image = NewMagickWand();
colour = NewPixelWand();
PixelSetColor(colour, "rgb(200, 200, 255)");
if (!MagickNewImage(image, WIDTH, HEIGHT, colour)) return;
drawing = NewDrawingWand();
PixelSetColor(colour, "black");
DrawSetStrokeColor(drawing, colour);
PixelSetColor(colour, "white");
DrawSetFillColor(drawing, colour);
DrawPolygon(drawing,5,ptest);
MagickWriteImage(image, "mwtest.png");
MagickWandTerminus();
}
I'm sure I'm making some fundamental mistake, but I can't see what it is ...