DrawText example for C++ 5.0 and later

This example demonstrates most of the properties of a three-dimensional text object as it draws rotated text on the current bitmap.

   ILEADRasterFXD *m_pltRasFxd=NULL;
   CoCreateInstance(CLSID_LEADRasterFXD, NULL, CLSCTX_ALL, IID_ILEADRasterFXD, (void**)&m_pltRasFxd);
   ILEADRasterIO *pRasterIO=NULL;
   CoCreateInstance(CLSID_LEADRasterIO, NULL, CLSCTX_ALL, IID_ILEADRasterIO, (void**)&pRasterIO);

ILEADRasterProcess *pltRasProc = NULL;
CoCreateInstance(CLSID_LEADRasterProcess, NULL, CLSCTX_ALL, IID_ILEADRasterProcess, (void**)& pltRasProc);

m_LEADRasterView1.SetAutoRepaint(FALSE);
// Load an image for the main control
pRasterIO->Load(m_LEADRasterView1.GetRaster(), "c:\\lead\\images\\image1.cmp", 0, 0, 1);
// Load an image for the foreground of the text
pRasterIO->Load(m_LEADRasterView2.GetRaster(), "ulay1.bmp", 0, 0, 1);
// text location
m_pltRasFxd->PutTextTop(50);
m_pltRasFxd->PutTextLeft(50);
m_pltRasFxd->PutTextWidth(m_LEADRasterView1.GetDstWidth() - 50);
m_pltRasFxd->PutTextHeight(m_LEADRasterView1.GetDstHeight() - 50);
// The foreground image needs to be the correct size.
pltRasProc->Size(m_LEADRasterView1.GetRaster().m_lpDispatch, m_pltRasFxd->GetTextWidth(), m_pltRasFxd->GetTextHeight(), RESIZE_NORMAL);
// Text alignment and angle
m_pltRasFxd->PutTextAlign(FXD_TEXTALIGN_HCENTER_VCENTER);
m_pltRasFxd->PutTextAngle(450);   // 45 degrees
// Text highlight color and style
m_pltRasFxd->PutTextHiliteColor(RGB(255, 255, 255));
m_pltRasFxd->PutTextStyle(FXD_TEXTSTYLE_DROPSHADOW);
// Text drop shadow
m_pltRasFxd->PutShadowColor(RGB(0, 0, 0));
m_pltRasFxd->PutShadowXDepth(5);
m_pltRasFxd->PutShadowYDepth(5);
// Make the text a permanent part of the bitmap
m_pltRasFxd->PutDrawPersistence(TRUE);
// Draw the text
m_pltRasFxd->DrawText((ILEADRaster *)m_LEADRasterView1.GetRaster().m_lpDispatch, NULL, "LEADTOOLS", m_LEADRasterView2.GetRaster().GetBitmap());
m_LEADRasterView1.ForceRepaint();

m_pltRasFxd->Release();
pRasterIO->Release();
pltRasProc->Release();