How to turn an image like a compass rose

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
 
V

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
 
S

Sergey Bogdanov

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top