tags:

views:

323

answers:

1

I'm using Direct2D in C#, and I've seen some examples on MSDN (in C++), that use operator * to multiply matrices (Matrix3x2F). However, in C#, not only is operator* not overloaded, but there's no method that allows me to do this, so I can't "accumulate transformations". Am I missing something? Are there any helper methods for this? I've tried writing my own, but failed...

+1  A: 

What wrapper are you using for C#, usually you'd use either C# or SlimDX however both have multiply overloaded for matrices. If whatever you're using doesn't have these two can switch to one that does or write your own. It's not too hard to write your own, it's simply each row multiplied by each column for each cell. http://en.wikipedia.org/wiki/Matrix_multiplication can give a more detailed example.

Lavinski
I'm using Direct2D via WindowsAPICodePack. I was thinking of switching to SlimDX, thanks.
fingerprint211b