Page 1 of 1

Setting point stroke size

Posted: 2007-08-14T01:12:50-07:00
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 );