开发者

Is matrix concatenation backwards in Android?

开发者 https://www.devze.com 2023-01-13 00:39 出处:网络
I would expect (based on intuition, and the implementation of AffineTransform in Java): a.postConca开发者_StackOverflow中文版t(b) ->a = a x b

I would expect (based on intuition, and the implementation of AffineTransform in Java):

a.postConca开发者_StackOverflow中文版t(b) ->  a = a x b  
a.preConcat(b) -> a = b x a

but according to the android documentation:

public boolean preConcat (Matrix other)  

Preconcats the matrix with the specified matrix. M' = M x other

public boolean postConcat (Matrix other)  

Postconcats the matrix with the specified matrix. M' = other x M

This seems backwards to me, am I missing something?


I suppose that the method 'post concat' is called so because the transformation, which the matrix other describes, is performed after the transformation matrix M stands for.

0

精彩评论

暂无评论...
验证码 换一张
取 消