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 

FillRect, Brush.Style := bsFDiagonal, HOW TO SET Background

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Graphics
View previous topic :: View next topic  
Author Message
Mika Parjanen
Guest





PostPosted: Wed Mar 30, 2005 1:49 pm    Post subject: FillRect, Brush.Style := bsFDiagonal, HOW TO SET Background Reply with quote



How can I set background to red and draw thin black lines into Canvas?

When I do this:

Canvas.Brush.Style := bsFDiagonal;
Canvas.Brush.Color := clRed;
Canvas.FillRect(rectangle);

The colors are vice versa. But where the Fillrect takes the background
color?

Thanks!

-Mika


Back to top
Boris Novgorodov
Guest





PostPosted: Wed Mar 30, 2005 2:02 pm    Post subject: Re: FillRect, Brush.Style := bsFDiagonal, HOW TO SET Backgr Reply with quote



Quote:
How can I set background to red and draw thin black lines into Canvas?

Canvas.Brush.Color := clBlack;
Canvas.Brush.Style := bsFDiagonal;
SetBkColor(Canvas.Handle, clRed); // After Brush.Style !!!
Canvas.FillRect(ClientRect);


--
Regards
Boris Novgorodov



Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Graphics 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.