Help HMC5883L + graphical compass

Help,
Is there somewhere a sketch to display a graphical compass on a tft screen with a HMC5883L that points to north.

Something like this but on a tft/lcd screen on a mega board

Raduen