Page 1 of 1

How do I use gravity with DrawableText?

Posted: 2013-11-07T15:55:31-07:00
by octopus
I am trying to place text at the bottom of an image I have called 'desktop'. The following code does not put it where I want. How can I fix it?

Code: Select all

  list<Magick::Drawable> drawList;
  drawList.push_back( Magick::DrawableGravity(Magick::SouthGravity) );
  drawList.push_back( Magick::DrawableFillColor("black") );
  drawList.push_back( Magick::DrawableStrokeColor("black") );
  drawList.push_back( Magick::DrawableFont(fontface) );
  drawList.push_back( Magick::DrawablePointSize(30) );
  drawList.push_back( Magick::DrawableText(0.5*pContext->width,pContext->height-50,text) );
  desktop.draw( drawList );