TGradient CopyPatternTo Bug

Please post bug reports, feature requests, or any question regarding the DELPHI AREA products here.

TGradient CopyPatternTo Bug

Postby LittleBear » March 29th, 2006, 2:40 pm

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.
LittleBear
Member
Member
 
Posts: 1
Joined: March 29th, 2006, 2:16 pm

Postby Kambiz » March 29th, 2006, 7:26 pm

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
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2408
Joined: March 7th, 2003, 7:10 pm


Return to DELPHI AREA Products

Who is online

Users browsing this forum: No registered users and 1 guest

cron