Problem with ArcDistortion
Posted: 2009-03-24T04:13:30-07:00
Good Morning,
I'm trying to bend a text string with ArcDistortion, but I have a problem. My code is :
The problem is that, getting trim the wand before, when I use ArcDistortion this wand becomes to four red pixels instead the word "hello!" bended and trimed. Note that I use MagickTrue in the parameter "Best-fit", is something wrong in my code to achieve this result? Thanks a lot! Best regards.
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
}