Click here to Skip to main content
15,886,519 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I'm trying to find Bitmap's head... umm it's too hard to describe for my bad english... :(

+-o-+
|   |
|   |
|   |
+---+

This is what i want
(o mark is Bitmap's head)

It's easy when Bitmap is not rotated.
If Bitmap rotated 90' degree will change like this:
+------+
|      o
+------+


I made this formula but it's not perfect what i expected.
(it's only work Bitmap's Height is bigger than Width)

Formula:
VB
X = 1 + (Math.Sin(DegreeToRadian(Angle)) * 2) * (Me.Height / 4)
Y = 2 + (-Math.Cos(DegreeToRadian(Angle)) * 2) * (Me.Height / 4)



I'm so sorry for my bad describe and english ..:O
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900