WPF Animate a Matrix using interpolation

Posted by Mark on Stack Overflow See other posts from Stack Overflow or by Mark
Published on 2010-04-03T03:10:08Z Indexed on 2010/04/03 3:23 UTC
Read the original article Hit count: 318

Filed under:
|
|

I'm having a issue with my application that is using touch gestures to scale, translate and rotate my scene.

I was using a TransformGroup which contained TranslateTransform, ScaleTransform and a RotateTransform but I could not get the movement correct, it always jumps and skips, so I moved to a MaxtrixTransform which I was able to use much easier to get my scene to be zoomable, rotatable and panable nicely.

However, what I later found out was that you cannot animate smoothly (using interpolation) the values of a Matrix, for what reason I have no idea, but its part of the MSDN doco and the properties of the Matrix are not dependency properties anyways...

Has anyone had any luck animating a matrix to make it smooth?

The only idea(s) I have had is to animate a few different, custom DP which all have callbacks that I update the matrix from OR To convert the matrix to a set of Transform objects that I then animate and then afterwords convert back.

Is there a smarter way to do this?

© Stack Overflow or respective owner

Related posts about wpf

Related posts about translation