Vous pouvez faire quelque chose comme ça (pour le style par défaut), notez que vous aurez besoin pour améliorer la fonction ReplaceBlackColor
pour faire bulle complètement blanc
procedure ReplaceBlackColor(const ABitmap: TBitmap);
var
I, J: Integer;
M: TBitmapData;
C: PAlphaColorRec;
begin
if ABitmap.Map(TMapAccess.ReadWrite, M) then
try
for J := 0 to ABitmap.Height - 1 do
for I := 0 to ABitmap.Width - 1 do
begin
C := @PAlphaColorArray(M.Data)[J * (M.Pitch div 4) + I];
if C^.Color = TAlphaColorRec.Black then
C^.Color := TAlphaColorRec.White;
end;
finally
ABitmap.Unmap(M);
end;
end;
procedure TForm3.Button1Click(Sender: TObject);
var
bla: TBitmapListAnimation;
begin
bla := AniIndicator1.FindStyleResource('ani') as TBitmapListAnimation;
ReplaceBlackColor(bla.AnimationBitmap);
end;
Ajouter un livre de style et modifier le style de la compoent. Vous pouvez trouver beaucoup d'exemples en ligne –
Oui, mais c'est un peu différent avec l'AniIndicator, je n'ai pas vu le détail du composant? – Bosshoss