Trying to set Font in VLDrawTextLayer - Printable Version +- Forums (http://mitov.com/forum) +-- Forum: VCL Components (/forum-6.html) +--- Forum: VideoLab (/forum-19.html) +--- Thread: Trying to set Font in VLDrawTextLayer (/thread-76.html) Pages: 1 2 |
RE: Trying to set Font in VLDrawTextLayer - Dave - 12-20-2011 10:39 PM 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 RE: Trying to set Font in VLDrawTextLayer - BReeves - 12-21-2011 12:43 AM 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. 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 |