1px thick DrawablePolyline

Magick++ is an object-oriented C++ interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning Magick++.
Post Reply
WatchCat
Posts: 1
Joined: 2019-12-17T23:07:44-07:00
Authentication code: 1152

1px thick DrawablePolyline

Post by WatchCat »

Hello.

How to draw polyline with 1px thick?
When i using DrawableStrokeWith(1.0) the polyline still have thickness 3px.
Image
sample code:

Code: Select all

	{
		DrawableList drawList;

		drawList.push_back( DrawableFillColor( none ) );
		drawList.push_back( DrawableStrokeAntialias( false ) );
		drawList.push_back( DrawableStrokeWidth( 1.0 ) );
		drawList.push_back( DrawableStrokeColor( blue ) );

		CoordinateList polyline;
		polyline.push_back( Coordinate(20,10) );
		polyline.push_back( Coordinate(30,20) );
		polyline.push_back( Coordinate(20,30) );

		drawList.push_back( DrawablePolyline( polyline ) );

		checkBoard->draw( drawList );
	}

	{
		DrawableList drawList;

		drawList.push_back( DrawableFillColor( blue ) );
		drawList.push_back( DrawableStrokeAntialias( false ) );
		drawList.push_back( DrawableStrokeWidth( 1.0 ) );
		drawList.push_back( DrawableStrokeColor( none ) );

		drawList.push_back( DrawableLine( 20,40, 30,50 ) );
		drawList.push_back( DrawableLine( 30,50, 20,60 ) );

		checkBoard->draw( drawList );

	}

Post Reply