views:

126

answers:

1

I'm working on a WPF image viewer which needs to allow for rubber band selection after an image has been transformed. I've got it working for zoom and transformation, but when the image is rotated, the selection's top left position is wrong.

I've tried a couple of ideas to fix this with some basic trig functions, but i just can't seem to account for the rotation...

I've put the project up and would be really appreciative if anyone has any ideas how to fix the offset: http://cid-c7fc79ad1472a4b7.skydrive.live.com/self.aspx/Public/ImageViewer.zip

Thanks in advance!

A: 

I've figured out a solution by taking an additional mouse point relative to the image - it was so simple in the end, that i wont bother posting the correct code up (i added 2 lines only!)

Tom Allen