Hi everyone,

I met a problem. I want to draw some objects, rectangle and circle and so
on. I specified the back ground color, and also the stroke pen color and
fill color.
After drawing these objects, it seemed that there existed many types of
color, which is not my origin purpose. I want in this image, there exists
only two kinds of color, one is the back ground color, another is the filled
color used to draw objects. Because the pixel intensity is more important
for me. I am thinking about in imagemagick if there exists some functions
like the CDC::SetRop2 in Microsoft GDI
Any suggestion will be appreciated.
I am attaching the code  below. Thanks for your attention,
Regards,
wediong

********************************************************************************************************************************************8
    Image image( Geometry(ImageSize_X, ImageSize_Y), ColorRGB(0, 0, 0) );

  // Construct drawing list
  std::list<Magick::Drawable> drawList;

  // Add some drawing options to drawing list
  drawList.push_back(DrawableStrokeColor(ColorRGB(1, 1, 1))); // Outline
color
  drawList.push_back(DrawableStrokeWidth(1)); // Stroke width
  drawList.push_back(DrawableFillColor(ColorRGB(1, 1, 1))); // Fill color

  // Add a Circle to drawing list
  for (PointListType::const_iterator it = lstcircleposition.begin(); it !=
lstcircleposition.end(); it++)
  {
    drawList.push_back(DrawableCircle(it->first, it->second, Circle_Radius +
it->first , it->second));
  }

  // Draw everything using completed drawing list
  image.draw(drawList);

  // Display the result
  //image.display( );

  // Save the image
  image.write("res.png");
_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users

Reply via email to