DELPHI AREA
MESSAGE BOARD
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   FavoritesFavorites   Watched TopicsWatched Topics     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

TGradient CopyPatternTo Bug

 
Post new topic   Reply to topic   printer-friendly view    DELPHI AREA Forum Index -> DELPHI AREA's Products
View previous topic :: View next topic  
Author Message
LittleBear
Member


Joined: 29 Mar 2006
Posts: 1

PostPosted: 29/03/06 14:40    Post subject: TGradient CopyPatternTo Bug Reply with quote

Hi,
I been playing around with the TGradient Component so far I like it but I found a problem using the CopyPatternTo procedure. This procedure won't fill the whole bitmap with some of the styles.
This is my code, MyBitmap is a TImage Component:

Begin
Mybitmap.Stretch := false
Gradient1.Style := gsLinearV;
Gradient1.CopyPatternTo(Mybitmap.Picture.Bitmap);
end;

The problem only happen with the styles gsLinearV, gsReflectedH, gsReflectedV, gsDiagonalLF

Tank's for any help.

BTW: I could use the Stretch property of the TImage Component but I have to copy the Bitmap to another component.
Back to top
View user's profile Send private message
Kambiz
Administrator


Joined: 07 Mar 2003
Posts: 1044
Location: Tehran, Iran

PostPosted: 29/03/06 19:26    Post subject: Reply with quote

This is not a bug.

The pattern size depends to the selected gradient style. For example, gsLinearV has a 1x256 bitmap pattern, and gsReflectedV has a 1x512 bitmap pattern.

By the way, to see the whole pattern, be sure the Image control has Transparent property as False, and one of Stretch, Propertional or AutoSize properties as True.

_________________
Kambiz
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    DELPHI AREA Forum Index -> DELPHI AREA's Products All times are GMT
Page 1 of 1

Add to favorites

 
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
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group