DrawTextStr example for C++ Builder

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

Lead1->AutoRepaint = False;
/* Load an image for the main control */
Lead1->Load ("c:\\lead\\images\\image1.cmp", 0, 0, 1);
/* Load an image for the foreground of the text */
Lead2->Load ("c:\\lead\\images\\ulay1.bmp", 0, 0, 1);
/*Only TrueType fonts can be rotated*/
Lead1->TextFont->Name = "Times New Roman";
Lead1->TextFont->Size = 72;
/* Text location */
Lead1->TextTop = 50;
Lead1->TextLeft = 50;
Lead1->TextWidth = Lead1->DstWidth - 50;
Lead1->TextHeight = Lead1->DstHeight - 50;
/* The foreground image needs to be the correct size. */
Lead2->Size (Lead1->TextWidth, Lead1->TextHeight, 0);
/* Text alignment and angle */
Lead1->TextAlign = etaHcenterVcenter;
Lead1->TextAngle = 450;   /* 45 degrees */
/* Text highlight color and style */
Lead1->TextHiliteColor = (TColor)RGB(255, 255, 255);
Lead1->TextStyle = etsDropShadow;
/* Text drop shadow */
Lead1->ShadowColor = (TColor)RGB(0, 0, 0);
Lead1->ShadowXDepth = 5;
Lead1->ShadowYDepth = 5;
/* Make the text a permanent part of the bitmap */
Lead1->DrawPersistence = True;
/* Draw the text */
Lead1->DrawTextStr("LEADTOOLS", Lead2->Bitmap);
Lead1->ForceRepaint();