Hi guys,
your TGradient is really cool, but it misses a function I think, the ability so save the actual bitmap of the gradient.
Is there any way to get it? Personally I tried a CopyRect, but it has a lot of problems.
Thank you
Christian Cristofori
TGradientHack = class(TGradient);
Image1.Picture.Assign(TGradientHack(Gradient1).Pattern);
procedure TForm1.Button1Click(Sender: TObject);
var
Pattern: TBitmap;
Rect: TRect;
begin
Pattern := TBitmap.Create;
try
Gradient1.CopyPatternTo(Pattern);
SetRect(Rect, 0, 0, MyBitmap.Width, MyBitmap.Height);
MyBitmap.Canvas.StretchDraw(Rect, Pattern);
finally
Pattern.Free;
end;
end;
Return to DELPHI AREA Projects
Users browsing this forum: No registered users and 1 guest