I'm trying to bend a text string with ArcDistortion, but I have a problem. My code is :
Code: Select all
main()
{
MagickWandGenesis();
MagickWand* wand = NewMagickWand();
DrawingWand* dwand = NewDrawingWand();
PixelWand* pwand = NewPixelWand();
PixelSetColor(pwand,"red");
DrawSetGravity(dwand,CenterGravity);
DrawSetFontSize(dwand,25);
DrawSetFont(dwand,"Utopia-Regular");
DrawSetFillColor(dwand,pwand);
DrawAnnotation(dwand,0,0,"hello!");
PixelSetColor(pwand,"none");
MagickNewImage(wand,200,200,pwand);
MagickDrawImage(wand,dwand);
MagickTrimImage(wand,0);
double dargs[1] ;
dargs[0] = 90;
MagickDistortImage(wand, ArcDistortion, 1, dargs, MagickTrue );
//Clean Up
}