Setting point stroke size

The MagickWand interface is a new high-level C API interface to ImageMagick core methods. We discourage the use of the core methods and encourage the use of this API instead. Post MagickWand questions, bug reports, and suggestions to this forum.
Post Reply
mkoppanen
Posts: 309
Joined: 2007-06-09T07:06:32-07:00

Setting point stroke size

Post by mkoppanen »

Seems like stroke width does not affect DrawPoint at all. This code results in 1x1 point here. Is it supposed to affect?


MagickBooleanType status;
MagickWand *magick_wand;
PixelWand *pixel_wand;
DrawingWand *drawing_wand;

MagickWandGenesis();

magick_wand = NewMagickWand();
pixel_wand = NewPixelWand();
drawing_wand = NewDrawingWand();

/* Create an empty white image */
status = PixelSetColor( pixel_wand, "white" );
status = MagickNewImage(magick_wand, 400, 400, pixel_wand);

/* Set some stroke options */
status = PixelSetColor( pixel_wand, "black" );

DrawSetStrokeWidth( drawing_wand, 5 );
DrawSetStrokeColor( drawing_wand, pixel_wand );

DrawPoint( drawing_wand, 200, 200 );

MagickDrawImage( magick_wand, drawing_wand );

MagickSetImageFormat( magick_wand, "png" );
MagickWriteImage( magick_wand, "/tmp/test.png" );


magick_wand = DestroyMagickWand( magick_wand );
MagickWandTerminus();
return( 0 );
Mikko Koppanen
My blog: http://valokuva.org
Post Reply