| View previous topic :: View next topic |
| Author |
Message |
LittleBear Member
Joined: 29 Mar 2006 Posts: 1
|
Posted: 29/03/06 14:40 Post subject: TGradient CopyPatternTo Bug |
|
|
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 |
|
 |
Kambiz Administrator

Joined: 07 Mar 2003 Posts: 1044 Location: Tehran, Iran
|
Posted: 29/03/06 19:26 Post subject: |
|
|
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 |
|
 |
|