procedure TONButton.Paint;
var
img:TBGRABitmap;
begin
if FSkindata <> nil then
begin
img:=TBGRABitmap.Create(FSkindata.Images);
try
Fresim.SetSize(Self.Width,Self.Height);
if Enabled = True then
begin
case FDurum of
bsNormal: DR := Rect(FNormal.FSSOL,
FNormal.FSUST, FNormal.FSSAG, FNormal.FSALT);
bsbasili: DR := Rect(FBasili.FSSOL,
FBasili.FSUST, FBasili.FSSAG, FBasili.FSALT);
bsuzerinde: DR :=Rect(FUzerinde.FSSOL,
FUzerinde.FSUST, FUzerinde.FSSAG, FUzerinde.FSALT);
end;
end
else
begin
DR := Rect(FPasif.FSSOL, FPasif.FSUST, FPasif.FSSAG, FPasif.FSALT);
end;
Fresim.StretchPutImage(Rect(0,0,Self.Width,Self.Height),img.GetPart(DR),dmLinearBlend);
if Crop=true then
CropToimg(Fresim);
finally
FreeAndNil(img);
end;
end;
inherited;
end;
I guess you meant that way?