Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-36340

Sprites interpolate incorrectly when they are on multiple rows

    XMLWordPrintable

Details

    • d37b770a353079d1e8e34b5f59d4cd132fbd04e2

    Description

      To reproduce make the following change to the AnimatedSprite example:

      --- a/examples/quick/imageelements/animatedsprite.qml
      +++ b/examples/quick/imageelements/animatedsprite.qml
      @@ -55,10 +55,10 @@ Item {
               anchors.centerIn: parent
               source: "content/speaker.png"
               frameCount: 60
      -        frameSync: true
               frameWidth: 170
               frameHeight: 170
               loops: 3
      +        frameDuration: 300
           }
       //! [sprite]
       
      

      Note that when transitioning from the first row of sprites to the second, there is a long frame. Interpolation breaks at this point because the code does:

      if (frameAt < (frameCount-1))
          x2 += w;
      

      which assumes a single row to work correctly.

      This is an issue for both AnimatedSprite and SpriteSequence.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            mbrasser Michael Brasser
            mbrasser Michael Brasser
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes