How to turn an image like a compass rose

  • Thread starter Thread starter Volker Kugler
  • Start date Start date
V

Volker Kugler

Hi,

i search for a possibility to turn an image on a pocket pc.
I want to show gps data in form of a compass rose.

Can anybody show me an example to implement something like that?

Thanks

Volker Kugler
 
Is this example on a real Pocket PC as slow as in the emulator?

Because to show a compass rose, i can't wait a few seconds after
changing the angle of the graphic.

Thanks

Volker
 
This example just demonstrates the idea how it can be done. To optimize
performance you have to substitute GetPixel/SetPixel with direct image
operations (e.g. by using OpenNETCF.Drawing.BitmapEx.LockBits/UnlockBits
from SDF).

Also you can draw the arrow dynamically with Graphics.FillPolygon. Each
points can be rotated by using the same formula:

nx = x * cos(rad) - y * sin(rad)
ny = x * sin(rad) + y * cos(rad)
 
Back
Top