BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Device Context of a TImage

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (VCL Components Usage)
View previous topic :: View next topic  
Author Message
Brian Plotkin
Guest





PostPosted: Mon May 14, 2007 3:19 pm    Post subject: Device Context of a TImage Reply with quote



How can I get the device context (if possible) of a TImage?

I want to use the GradientFill function which requires a dc.

TIA,
Brian
Back to top
Clayton Arends
Guest





PostPosted: Mon May 14, 2007 8:49 pm    Post subject: Re: Device Context of a TImage Reply with quote



The Canvas member of TImage allows you to draw on the TImage. The Handle
member of TCanvas is the DC.

One caveat: accessing the Canvas member only works if the TImage isn't
storing any picture or if the stored picture is a TBitmap. If the TImage
isn't storing any picture then internally TImage will create a TBitmap the
size of the TImage when the Canvas property is accessed.

- Clayton
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (VCL Components Usage) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.