#include <Gui/DrawTextWx.hh>
#include <wx/wx.h>
#include <Base/Image/Image.hh>
#include <Base/Image/ImageIO.hh>
using namespace BIAS;
using namespace std;
class MyApp : public wxApp
{
virtual bool OnInit()
{
wxInitAllImageHandlers();
unsigned width = 640, height = 480;
cerr << "Error saving source image\n";
return false;
}
string text = "foobar 42";
unsigned pos_x = 10, pos_y = 10;
unsigned bb_text_width, bb_text_height;
bb_text_height)!=DTWX_OK){
cerr << "Error getting text extend\n";
return false;
}
cout << "extend of text is "<<bb_text_width<<", "<<bb_text_height<<endl;
cerr << "Error drawing text\n";
return false;
}
text += "(centered)";
pos_x = width/2;
pos_y = height/2;
unsigned point_size = 12;
point_size, valign, halign)!=DTWX_OK){
cerr << "Error drawing text\n";
return false;
}
cerr << "Error saving destination image\n";
return false;
}
return false;
}
};
IMPLEMENT_APP(MyApp)