Fix:wince: Correct text angle when negative
authorzaxl <zaxl@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Tue, 28 Oct 2008 23:59:57 +0000 (23:59 +0000)
committerzaxl <zaxl@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Tue, 28 Oct 2008 23:59:57 +0000 (23:59 +0000)
git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@1603 ffa7fe5e-494d-0410-b361-a75ebd5db220

navit/navit/graphics/win32/graphics_win32.c

index f77ae41..1115766 100644 (file)
@@ -635,6 +635,8 @@ static void draw_text(struct graphics_priv *gr, struct graphics_gc_priv *fg, str
 
 
        double angle = -atan2( dy, dx ) * 180 / 3.14159 ;
+       if (angle < 0)
+               angle += 360;
 
        SetTextAlign (hMemDC, TA_BASELINE) ;
        SetViewportOrgEx (hMemDC, p->x, p->y, NULL) ;