AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Firemonkey: Animationen in Frames?

Ein Thema von kaju74 · begonnen am 10. Apr 2015 · letzter Beitrag vom 10. Apr 2015
 
kaju74

Registriert seit: 22. Okt 2003
185 Beiträge
 
#10

AW: Firemonkey: Animationen in Frames?

  Alt 10. Apr 2015, 12:32
Also, das scheint irgendwie an der ColorKey-Animation zu liegen. Mit der Color-Animation geht's...

Das Problem scheint hier zu liegen:
Delphi-Quellcode:
procedure TColorKeyAnimation.ProcessAnimation;
var
  T: TRttiType;
  P: TRttiProperty;
  Key1, Key2: TKey;
begin
  if FInstance <> nil then
  begin
    if FKeys.FindKeys(NormalizedTime, Key1, Key2) then
    begin
      if (TFloatKey(Key2).Key - TFloatKey(Key1).Key) = 0 then
        Exit;
      T := SharedContext.GetType(FInstance.ClassInfo);
      if T <> nil then
      begin
        P := T.GetProperty(FPath);
        if (P <> nil) and P.PropertyType.IsOrdinal then
          P.SetValue(FInstance,
            InterpolateColor(TColorKey(Key1).Value, TColorKey(Key2).Value,
              (NormalizedTime - TFloatKey(Key1).Key) / (TFloatKey(Key2).Key - TFloatKey(Key1).Key)));
      end;
    end;
  end;
end;
Die Zeile:

if (TFloatKey(Key2).Key - TFloatKey(Key1).Key) = 0 then verhält sich in einer Form anders als in einem Frame. In einem Frame sind beide Werte = 0, sodaß mit "Exit" aus der Methode gesprungen wird. Bei einer Form nicht. Hier ist der erste Wert = 1 und der zweite = 0.

???

Gruß,
Marc

Geändert von kaju74 (10. Apr 2015 um 12:47 Uhr)
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 16:40 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz