Jump to content

Math question with A2Dv2


Recommended Posts

I am absolutely horrible at math(having a headache is not helping) so i have come here for a simple question.

I am using a2d to draw an image and based on the x and y of that image and the x and y of the mouse i need to rotate the image 1-360 degrees to point at the mouse.

[quote name='PsaltyDS' post='635433' date='Jan 27 2009, 07:04 AM']Larry is a mass murderer?! It's always the quiet, clean cut, bald guys... [/quote]

Link to comment
Share on other sites

I thought I might find sort of _GDIPlus_SetMapMode function but I don't see one heh. Anyway, I don't have a good start point for you on how to implement it in AutoIt nor do I good at math either, but the Gdi.dll got some nice functions like CombineTransform() or SetWorldTransform(). Search msdn about these functions.

Rotating HDC usually is implemented in one of some ways using the XFORM struct, just take the mouse coords and calculate the radians between the one of the axises and the mouse point using cos/sin, you might find better explanation than I give in MSDN and Wikipedia.

Link to comment
Share on other sites

The A2D udf has its own function to rotate my problem is finding out how to aim it at the mouse.

But i think i got it just let me test a few things.

Edited by MerkurAlex

[quote name='PsaltyDS' post='635433' date='Jan 27 2009, 07:04 AM']Larry is a mass murderer?! It's always the quiet, clean cut, bald guys... [/quote]

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...