Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Trying to set Font in VLDrawTextLayer
12-20-2011, 10:39 PM
Post: #11
RE: Trying to set Font in VLDrawTextLayer
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
Quote this message in a reply
12-21-2011, 12:43 AM
Post: #12
RE: Trying to set Font in VLDrawTextLayer
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
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 3 Guest(s)