drawtest.c

Go to the documentation of this file.
00001 /*
00002  *
00003  * Test program for C drawing API
00004  * Written by Bob Friesenhahn
00005  *
00006  */
00007 
00008 #if !defined(_VISUALC_)
00009 #include <magick/magick-config.h>
00010 #endif
00011 #include <stdio.h>
00012 #include <stdlib.h>
00013 #include <string.h>
00014 #include <sys/types.h>
00015 #if defined(_VISUALC_)
00016 #include <stdlib.h>
00017 #include <sys\types.h>
00018 #endif
00019 #include <time.h>
00020 #include <wand/MagickWand.h>
00021 
00022 static void ScribbleImage (Image *image)
00023 {
00024   DrawingWand
00025     *draw_wand;
00026 
00027   PixelWand
00028     *color;
00029 
00030   draw_wand=DrawAllocateWand((DrawInfo*) NULL,image);
00031   color=NewPixelWand();
00032   (void) PushDrawingWand(draw_wand);
00033   {
00034     DrawSetViewbox(draw_wand,0,0,image->columns,image->rows);
00035     DrawScale(draw_wand,1.101,1.08);
00036     DrawTranslate(draw_wand,-23.69,-22.97);
00037     DrawRotate(draw_wand,0);
00038     (void) PixelSetColor(color,"#ffffff");
00039     DrawSetFillColor(draw_wand,color);
00040     DrawRectangle(draw_wand,23.69,22.97,564.6,802.2);
00041     DrawSetFillAlpha(draw_wand,1.0);
00042     (void) PixelSetColor(color,"none");
00043     DrawSetFillColor(draw_wand,color);
00044     DrawSetStrokeColor(draw_wand,color);
00045 
00046     DrawSetStrokeAntialias(draw_wand,MagickTrue);
00047     DrawSetStrokeLineCap(draw_wand,RoundCap);
00048     DrawSetStrokeLineJoin(draw_wand,RoundJoin);
00049 
00050     DrawPushDefs(draw_wand);
00051     {
00052       DrawPushClipPath(draw_wand,"clip_1");
00053       {
00054         (void) PushDrawingWand(draw_wand);
00055         {
00056           DrawRectangle(draw_wand,0,0,595.3,841.9);
00057         }
00058         (void) PopDrawingWand(draw_wand);
00059       }
00060       DrawPopClipPath(draw_wand);
00061     }
00062     DrawPopDefs(draw_wand);
00063     
00064     (void) PushDrawingWand(draw_wand);
00065     {
00066       (void) DrawSetClipPath(draw_wand, "url(#clip_1)");
00067       
00068       (void) PushDrawingWand(draw_wand);
00069       {
00070         DrawSetStrokeAntialias(draw_wand,MagickTrue);
00071         DrawSetStrokeWidth(draw_wand,4.032);
00072         DrawSetStrokeLineCap(draw_wand,RoundCap);
00073         DrawSetStrokeLineJoin(draw_wand,RoundJoin);
00074         (void) DrawSetStrokeDashArray(draw_wand,0,(const double *)NULL);
00075         (void) PixelSetColor(color,"#ff0000");
00076         DrawSetStrokeColor(draw_wand,color);
00077         DrawSetFillRule(draw_wand,EvenOddRule);
00078         (void) PixelSetColor(color,"#ff00ff");
00079         DrawSetFillColor(draw_wand,color);
00080         DrawRectangle(draw_wand,72,72,144,144);
00081       }
00082       (void) PopDrawingWand(draw_wand);
00083       
00084       (void) PushDrawingWand(draw_wand);
00085       {
00086         DrawSetStrokeAntialias(draw_wand,MagickTrue);
00087         DrawSetStrokeWidth(draw_wand,9);
00088         DrawSetStrokeLineCap(draw_wand,RoundCap);
00089         DrawSetStrokeLineJoin(draw_wand,RoundJoin);
00090         (void) DrawSetStrokeDashArray(draw_wand,0,(const double *)NULL);
00091         (void) PixelSetColor(color,"#00ff00");
00092         DrawSetStrokeColor(draw_wand,color);
00093         DrawSetFillRule(draw_wand,EvenOddRule);
00094         (void) PixelSetColor(color,"#0080ff");
00095         DrawSetFillColor(draw_wand,color);
00096         DrawRoundRectangle(draw_wand,72,216,360,432,9,9);
00097       }
00098       (void) PopDrawingWand(draw_wand);
00099       
00100       (void) PushDrawingWand(draw_wand);
00101       {
00102         const PointInfo points[37] =
00103         {
00104           { 378.1,81.72 }, { 381.1,79.56 }, { 384.3,78.12 }, { 387.6,77.33 },
00105           { 391.1,77.11 }, { 394.6,77.62 }, { 397.8,78.77 }, { 400.9,80.57 },
00106           { 403.6,83.02 }, { 523.9,216.8 }, { 526.2,219.7 }, { 527.6,223 },
00107           { 528.4,226.4 }, { 528.6,229.8 }, { 528,233.3 },   { 526.9,236.5 },
00108           { 525.1,239.5 }, { 522.6,242.2 }, { 495.9,266.3 }, { 493,268.5 },
00109           { 489.7,269.9 }, { 486.4,270.8 }, { 482.9,270.9 }, { 479.5,270.4 },
00110           { 476.2,269.3 }, { 473.2,267.5 }, { 470.4,265 },   { 350,131.2 },
00111           { 347.8,128.3 }, { 346.4,125.1 }, { 345.6,121.7 }, {345.4,118.2 },
00112           { 346,114.8 },   { 347.1,111.5 }, { 348.9,108.5 }, { 351.4,105.8 },
00113           { 378.1,81.72 }
00114         };
00115         
00116         DrawSetStrokeAntialias(draw_wand,MagickTrue);
00117         DrawSetStrokeWidth(draw_wand,2.016);
00118         DrawSetStrokeLineCap(draw_wand,RoundCap);
00119         DrawSetStrokeLineJoin(draw_wand,RoundJoin);
00120         (void) DrawSetStrokeDashArray(draw_wand,0,(const double *)NULL);
00121         (void) PixelSetColor(color,"#000080");
00122         DrawSetStrokeColor(draw_wand,color);
00123         DrawSetFillRule(draw_wand,EvenOddRule);
00124         (void) PixelSetColor(color,"#c2c280");
00125         DrawSetFillColor(draw_wand,color);
00126         DrawPolygon(draw_wand,37,points);
00127       }
00128       (void) PopDrawingWand(draw_wand);
00129       
00130       (void) PushDrawingWand(draw_wand);
00131       {
00132         DrawSetStrokeAntialias(draw_wand,MagickTrue);
00133         DrawSetStrokeWidth(draw_wand,3.024);
00134         DrawSetStrokeLineCap(draw_wand,RoundCap);
00135         DrawSetStrokeLineJoin(draw_wand,RoundJoin);
00136         (void) DrawSetStrokeDashArray(draw_wand,0,(const double *)NULL);
00137         (void) PixelSetColor(color,"#000080");
00138         DrawSetStrokeColor(draw_wand,color);
00139         DrawSetFillRule(draw_wand,EvenOddRule);
00140         (void) PixelSetColor(color,"#000080");
00141         DrawSetFillColor(draw_wand,color);
00142         DrawEllipse(draw_wand,489.6,424.8,72,129.6,0,360);
00143       }
00144       (void) PopDrawingWand(draw_wand);
00145       
00146       (void) PushDrawingWand(draw_wand);
00147       {
00148         const PointInfo points[48] =
00149         {
00150           { 213.8,25.13},  { 216.7,24.48 }, {219.8,24.55 },  { 223.1,25.42 },
00151           { 226.7,27 },    { 230.3,29.3 },  { 234.1,32.26 }, { 237.9,35.86 },
00152           { 241.8,40.03 }, { 249.7,50.11 }, { 257.4,62.14 }, { 264.8,75.89 },
00153           { 271.6,91.15 }, { 277.3,106.8 }, { 281.6,121.8 }, { 284.4,135.9 },
00154           { 285.7,148.5 }, { 285.6,159.6 }, { 284.9,164.3 }, { 283.8,168.5 },
00155           { 282.5,172.1 }, { 280.7,175 },   { 278.5,177.3 }, { 275.9,178.7 },
00156           { 273,179.4 },   { 269.9,179.3 }, { 266.6,178.4 }, { 263.1,176.8 },
00157           { 259.5,174.5},  { 255.7,171.6 }, { 251.9,168 },   { 248,163.8 },
00158           { 244.1,159 },   { 240.1,153.7 }, { 232.3,141.7 }, { 225,127.9 },
00159           { 218.2,112.7 }, { 212.5,97.06 }, { 208.2,82.01 }, { 205.4,67.97 },
00160           { 204,55.3 },    { 204.3,44.35 }, { 204.9,39.6 },  { 205.9,35.42 },
00161           { 207.4,31.82 }, { 209.2,28.87 }, { 211.3,26.64},  { 213.8,25.13 }
00162         };
00163         
00164         DrawSetStrokeAntialias(draw_wand,MagickTrue);
00165         DrawSetStrokeWidth(draw_wand,3.024);
00166         DrawSetStrokeLineCap(draw_wand,RoundCap);
00167         DrawSetStrokeLineJoin(draw_wand,RoundJoin);
00168         (void) DrawSetStrokeDashArray(draw_wand,0,(const double *)NULL);
00169         (void) PixelSetColor(color,"#ff8000");
00170         DrawSetStrokeColor(draw_wand,color);
00171         DrawSetFillRule(draw_wand,EvenOddRule);
00172         (void) PixelSetColor(color,"#00ffff");
00173         DrawSetFillColor(draw_wand,color);
00174         DrawPolygon(draw_wand,48,points);
00175       }
00176       (void) PopDrawingWand(draw_wand);
00177       
00178       (void) PushDrawingWand(draw_wand);
00179       {
00180         DrawSetStrokeAntialias(draw_wand,MagickTrue);
00181         DrawSetStrokeWidth(draw_wand,12.02);
00182         DrawSetStrokeLineCap(draw_wand,RoundCap);
00183         DrawSetStrokeLineJoin(draw_wand,RoundJoin);
00184         (void) DrawSetStrokeDashArray(draw_wand,0,(const double *)NULL);
00185         (void) PixelSetColor(color,"#4000c2");
00186         DrawSetStrokeColor(draw_wand,color);
00187         (void) PixelSetColor(color,"none");
00188         DrawSetFillColor(draw_wand,color);
00189         DrawArc(draw_wand,360,554.4,187.2,237.6,0,90);
00190       }
00191       (void) PopDrawingWand(draw_wand);
00192 
00193       (void) PushDrawingWand(draw_wand);
00194       {
00195         DrawSetStrokeAntialias(draw_wand,MagickTrue);
00196         DrawSetStrokeWidth(draw_wand,9);
00197         DrawSetStrokeLineCap(draw_wand,RoundCap);
00198         DrawSetStrokeLineJoin(draw_wand,RoundJoin);
00199         (void) DrawSetStrokeDashArray(draw_wand,0,(const double *)NULL);
00200         (void) PixelSetColor(color,"#4000c2");
00201         DrawSetStrokeColor(draw_wand,color);
00202         DrawSetFillRule(draw_wand,EvenOddRule);
00203         (void) PixelSetColor(color,"#4000c2");
00204         DrawSetFillColor(draw_wand,color);
00205         DrawEllipse(draw_wand,388.8,626.4,100.8,122.4,0,90);
00206       }
00207       (void) PopDrawingWand(draw_wand);
00208 
00209       (void) PushDrawingWand(draw_wand);
00210       {
00211         const PointInfo points[6] =
00212         {
00213           { 180,504 }, { 282.7,578.6 }, { 243.5,699.4 }, { 116.5,699.4 },
00214           { 77.26,578.6 }, { 180,504 }
00215         };
00216         
00217         DrawSetStrokeAntialias(draw_wand,MagickTrue);
00218         DrawSetStrokeWidth(draw_wand,9);
00219         DrawSetStrokeLineCap(draw_wand,RoundCap);
00220         DrawSetStrokeLineJoin(draw_wand,RoundJoin);
00221         (void) DrawSetStrokeDashArray(draw_wand,0,(const double *)NULL);
00222         (void) PixelSetColor(color,"#4000c2");
00223         DrawSetStrokeColor(draw_wand,color);
00224         DrawSetFillRule(draw_wand,EvenOddRule);
00225         (void) PixelSetColor(color,"#800000");
00226         DrawSetFillColor(draw_wand,color);
00227         DrawPolygon(draw_wand,6,points);
00228       }
00229       (void) PopDrawingWand(draw_wand);
00230       
00231       (void) PushDrawingWand(draw_wand);
00232       {
00233         const PointInfo points[11] =
00234         {
00235           { 180,504 },     { 211.8,568.3 }, { 282.7,578.6 }, { 231.3,628.7 },
00236           { 243.5,699.4 }, { 180,666 },     { 116.5,699.4 }, { 128.7,628.7 },
00237           { 77.26,578.6 }, { 148.2,568.3 }, { 180,504 }
00238         };
00239         
00240         DrawSetStrokeAntialias(draw_wand,MagickTrue);
00241         DrawSetStrokeWidth(draw_wand,9);
00242         DrawSetStrokeLineCap(draw_wand,RoundCap);
00243         DrawSetStrokeLineJoin(draw_wand,RoundJoin);
00244         (void) DrawSetStrokeDashArray(draw_wand,0,(const double *)NULL);
00245         (void) PixelSetColor(color,"#4000c2");
00246         DrawSetStrokeColor(draw_wand,color);
00247         DrawSetFillRule(draw_wand,EvenOddRule);
00248         (void) PixelSetColor(color,"#800000");
00249         DrawSetFillColor(draw_wand,color);
00250         DrawPolygon(draw_wand,11,points);
00251       }
00252       (void) PopDrawingWand(draw_wand);
00253       
00254       (void) PushDrawingWand(draw_wand);
00255       {
00256         const PointInfo points[15] =
00257         {
00258           { 540,288 },     { 561.6,216 },   { 547.2,43.2 },  { 280.8,36 },
00259           { 302.4,194.4 }, { 331.2,64.8 },  { 504,64.8 },    { 475.2,115.2 },
00260           { 525.6,93.6 },  { 496.8,158.4 }, { 532.8,136.8 }, { 518.4,180 },
00261           { 540,172.8 },   { 540,223.2 },   { 540,288 }
00262         };
00263         
00264         DrawSetStrokeAntialias(draw_wand,MagickTrue);
00265         DrawSetStrokeWidth(draw_wand,5.976);
00266         DrawSetStrokeLineCap(draw_wand,RoundCap);
00267         DrawSetStrokeLineJoin(draw_wand,RoundJoin);
00268         (void) DrawSetStrokeDashArray(draw_wand,0,(const double *)NULL);
00269         (void) PixelSetColor(color,"#4000c2");
00270         DrawSetStrokeColor(draw_wand,color);
00271         DrawSetFillRule(draw_wand,EvenOddRule);
00272         (void) PixelSetColor(color,"#ffff00");
00273         DrawSetFillColor(draw_wand,color);
00274         DrawPolygon(draw_wand,15,points);
00275       }
00276       (void) PopDrawingWand(draw_wand);
00277       
00278       (void) PushDrawingWand(draw_wand);
00279       {
00280         const PointInfo points[7] =
00281         {
00282           { 57.6,640.8 }, { 57.6,784.8 }, { 194.4,799.2 }, { 259.2,777.6 },
00283           { 151.2,756 }, { 86.4,748.8 }, { 57.6,640.8 }
00284         };
00285         
00286         DrawSetStrokeAntialias(draw_wand,MagickTrue);
00287         DrawSetStrokeWidth(draw_wand,5.976);
00288         DrawSetStrokeLineCap(draw_wand,RoundCap);
00289         DrawSetStrokeLineJoin(draw_wand,RoundJoin);
00290         (void) DrawSetStrokeDashArray(draw_wand,0,(const double *)NULL);
00291         (void) PixelSetColor(color,"#4000c2");
00292         DrawSetStrokeColor(draw_wand,color);
00293         DrawSetFillRule(draw_wand,EvenOddRule);
00294         (void) PixelSetColor(color,"#ffff00");
00295         DrawSetFillColor(draw_wand,color);
00296         DrawPolygon(draw_wand,7,points);
00297       }
00298       (void) PopDrawingWand(draw_wand);
00299       
00300       (void) PushDrawingWand(draw_wand);
00301       {
00302         const PointInfo points[193] =
00303         {
00304           { 27.86,565.3 }, { 29.66,550.8 }, { 31.97,538.1 }, { 34.85,527.1 },
00305           { 38.09,517.7 }, { 41.83,509.8 }, { 45.86,503.1 }, { 50.33,497.6 },
00306           { 55.08,493.2 }, { 60.19,489.8 }, { 65.45,487.3 }, { 70.92,485.4 },
00307           { 76.61,484.2 }, { 88.42,483 },   { 100.4,482.9 }, { 108.4,482.2 },
00308           { 119.8,480.3 }, { 150.8,474.1 }, { 189.4,466.6 }, { 210.3,463 },
00309           { 231.5,459.9 }, { 252.4,457.8 }, { 272.7,456.6 }, { 291.8,456.9 },
00310           { 300.7,457.7 }, { 309.1,458.9 }, { 316.9,460.6 }, { 324.1,462.8 },
00311           { 330.7,465.6 }, { 336.4,469 },   { 341.3,473 },   { 345.3,477.7 },
00312           { 348.4,483.1 }, { 350.4,489.2},  { 352.4,495.4 }, { 355.2,500.9 },
00313           { 358.8,505.8 }, { 363,510 },     { 367.8,513.6 }, { 373,516.8 },
00314           { 378.6,519.6 }, { 384.3,521.8 }, { 396.4,525.4 }, { 408.2,527.9 },
00315           { 428,531.2 },   { 434.6,532.9 }, { 436.7,533.8 }, { 437.8,534.9 },
00316           { 437.8,536.2 }, { 436.8,537.8 }, { 434.5,539.6 }, { 430.9,541.8 },
00317           { 419.3,547.6 }, { 401.3,555.2 }, { 342.4,577.9 }, {325.2,584.9 },
00318           { 311,591.3 },   { 300,597.3 },   { 291.6,602.8 }, { 285.8,607.8 }, 
00319           { 282.3,612.3 }, { 281.4,614.4 }, { 280.9,616.2 }, { 281.2,619.6 },
00320           { 282.1,621.2 }, { 283.3,622.6 }, { 286.8,624.9 }, { 291.5,626.6 },
00321           { 297.1,627.8 }, { 303.6,628.3 }, { 310.5,628.3 }, { 317.9,627.6 },
00322           { 325.2,626.3 }, { 332.6,624.3 }, { 339.5,621.7 }, { 345.9,618.4 },
00323           { 351.4,614.4 }, { 353.9,612.2 }, { 356,609.8 }, { 357.9,607.1 },
00324           { 359.4,604.3 }, { 360.6,601.3 }, { 361.4,598.2 }, { 361.7,594.9 },
00325           { 361.7,591.3 }, { 361.2,587.7 }, { 360.1,583.7 }, { 358.6,579.7 },
00326           { 356.4,575.4 }, { 353.7,570.9 }, { 350.4,566.2 }, { 346.4,561.3 },
00327           { 341.8,556.2 }, { 336.5,550.9 }, { 330.6,545.5 }, { 323.8,539.8 },
00328           { 316.2,533.9 }, { 298.7,521.5 }, { 277.8,508.2 }, { 256.1,495.5 },
00329           { 236,484.5 },   { 217.7,475.1 }, { 200.8,467.1 }, { 185.6,460.7 },
00330           { 171.9,455.5 }, { 159.6,451.6 }, { 148.6,448.8 }, { 139,447 },
00331           { 130.5,446.2 }, { 123.3,446.2 }, { 117.1,446.9 }, { 112,448.3 },
00332           { 107.9,450.2 }, { 104.8,452.5 }, { 102.5,455.2 }, { 101,458.1 },
00333           { 100.2,461.2 }, { 100.2,464.3 }, { 100.7,467.4 }, { 101.8,470.3 },
00334           { 103.4,473 },   { 105.4,475.3 }, { 107.8,477.1 }, { 110.5,478.4 },
00335           { 113.4,479.1 }, { 116.5,478.9 }, { 119.7,478 },   { 123,476.2 },
00336           { 126.4,473.3 }, { 129.6,469.2 }, { 132.7,463.9 }, { 135.2,458.4 },
00337           { 136.6,453.7 }, { 137,449.9 },   { 136.6,446.8 }, { 135.4,444.5 },
00338           { 133.3,442.9 }, { 130.8,441.9 }, { 127.5,441.4 }, { 123.9,441.6 },
00339           { 119.8,442.3 }, { 110.7,445.1 }, { 101.1,449.5 }, { 91.37,455.2 },
00340           { 82.37,461.9 }, { 74.66,469.2 }, { 71.57,473 },   { 68.98,476.8 },
00341           { 67.03,480.7 }, { 65.81,484.4 }, { 65.45,488.2 }, { 65.95,491.7 },
00342           { 67.46,495.1 }, { 69.98,498.3 }, { 73.66,501.3 }, { 78.55,503.9 },
00343           { 84.82,506.3 }, { 92.38,508.2 }, { 107.1,511.6 }, { 118.2,514.8 },
00344           { 125.9,517.8 }, { 130.7,520.4 }, { 132.1,521.7 }, { 132.8,522.9 },
00345           { 133,524.2 },   { 132.6,525.3 }, { 131.8,526.5 }, { 130.5,527.5 },
00346           { 126.6,529.6 }, { 121.5,531.7 }, { 115.3,533.7 }, { 101.4,537.6 },
00347           { 87.55,541.8 }, { 81.36,544 },   { 76.25,546.3 }, { 71.64,549.5 },
00348           { 66.89,554.1 }, { 62.14,559.8 }, { 57.38,566.1 }, { 48.17,579.6 },
00349           { 39.96,591.4 }, { 36.43,595.9 }, { 34.78,597.6 }, { 33.26,598.8 },
00350           { 31.9,599.6 },  { 30.67,599.9 }, { 29.59,599.7 }, { 28.66,598.8 },
00351           { 27.86,597.4 }, { 27.29,595.2 }, { 26.64,588.7 }, { 26.86,578.8 },
00352           { 27.86,565.3 }
00353         };
00354         
00355         DrawSetStrokeAntialias(draw_wand,MagickTrue);
00356         DrawSetStrokeWidth(draw_wand,5.904);
00357         DrawSetStrokeLineCap(draw_wand,RoundCap);
00358         DrawSetStrokeLineJoin(draw_wand,RoundJoin);
00359         (void) DrawSetStrokeDashArray(draw_wand,0,(const double *)NULL);
00360         (void) PixelSetColor(color,"#4000c2");
00361         DrawSetStrokeColor(draw_wand,color);
00362         DrawSetFillRule(draw_wand,EvenOddRule);
00363         (void) PixelSetColor(color,"#ffff00");
00364         DrawSetFillColor(draw_wand,color);
00365         DrawPolygon(draw_wand,193,points);
00366       }
00367       (void) PopDrawingWand(draw_wand);
00368     }
00369     (void) PopDrawingWand(draw_wand);
00370   }
00371   (void) PopDrawingWand(draw_wand);
00372   (void) DrawRender(draw_wand);
00373   color=DestroyPixelWand(color);
00374   draw_wand=DestroyDrawingWand(draw_wand);
00375 }
00376 
00377 int main ( int argc, char **argv )
00378 {
00379   Image *canvas = (Image *)NULL;
00380   char outfile[MaxTextExtent];
00381   int rows, columns = 0;
00382   char size[MaxTextExtent];
00383   ImageInfo *image_info;
00384   ExceptionInfo *exception;
00385 
00386   if ( argc != 2 )
00387     {
00388       (void) printf ( "Usage: %s filename\n", argv[0] );
00389       exit( 1 );
00390     }
00391 
00392   (void) CopyMagickString( outfile, argv[1], MaxTextExtent );
00393 
00394   if (LocaleNCompare("drawtest",argv[0],7) == 0)
00395     MagickCoreGenesis((char *) NULL,MagickTrue);
00396   else
00397     MagickCoreGenesis(*argv,MagickTrue);
00398 
00399   /*
00400    * Create canvas image
00401    */
00402   columns=596;
00403   rows=842;
00404   image_info=CloneImageInfo((ImageInfo*) NULL);
00405   exception=AcquireExceptionInfo();
00406   (void) FormatMagickString(size, MaxTextExtent, "%dx%d", columns, rows);
00407   (void) CloneString(&image_info->size,size);
00408   (void) CopyMagickString(image_info->filename,"xc:white",MaxTextExtent);
00409   canvas=ReadImage(image_info,exception );
00410   if (exception->severity >= ErrorException)
00411     CatchException(exception);
00412   if ( canvas == (Image *)NULL )
00413     {
00414       (void) printf ( "Failed to read canvas image %s\n",image_info->filename);
00415       exit(1);
00416     }
00417 
00418   /*
00419    * Scribble on image
00420    */
00421   ScribbleImage( canvas );
00422 
00423   /*
00424    * Save image to file
00425    */
00426   (void) CopyMagickString(canvas->filename,outfile,MaxTextExtent);
00427   (void) WriteImage ( image_info, canvas );
00428 
00429   exception=DestroyExceptionInfo(exception);
00430    canvas =DestroyImage( canvas );
00431    image_info =DestroyImageInfo( image_info );
00432   MagickCoreTerminus();
00433   return 0;
00434 }

Generated on Sat Nov 22 23:45:25 2008 for MagickWand by  doxygen 1.5.7.1