Forums

Full Version: Trying to set Font in VLDrawTextLayer
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2

Dave

You'll have to convert the colorformat from the FontDialog from BGR to RGBA like so for example:

int red=FontDialog1->Font->Color&0x0FF;
int green=(FontDialog1->Font->Color&0x0FF00)>>8;
int blue=(FontDialog1->Font->Color&0x0FF0000)>>16;
TColor col=0x0FF000000+blue+(green<<8)+(red<<16);
VLDrawTextLayer1->Font->Brush->Color=col;

Regards,
Dave

BReeves

Found it.... It is MakeColor(Color) not GPMakeColor(Color ); and is in IGDIPlus.pas

This works with the int varable I store the dialogue color in...

VLDrawTextLayer1->Font->Brush->Color= MakeColor( (TColor) MyColor );


(12-20-2011 10:03 PM)Dave Wrote: [ -> ]Sorry you're right, first thing i didn't try myself first.. I'll get back on this.

Regards,
Dave

Looks like we were posting at the same time.. If I rin into any issues with the MakeColor function I'll play with the code you posted.

Looks like we got it figured out.. Thanks a Million, you got me pointed in the right direction and we both now know more than we did Smile
Pages: 1 2
Reference URL's