[1/18] gdiplus: moved two inline helpers to the header

Evan Stade estade at gmail.com
Wed Jul 11 20:06:44 CDT 2007


Hi,

Changelog:
*moved roundr and deg2rad to the header.

 dlls/gdiplus/gdiplus_private.h |   11 +++++++++++
 dlls/gdiplus/graphics.c        |   10 ----------
 2 files changed, 11 insertions(+), 10 deletions(-)

-- 
Evan Stade
-------------- next part --------------
diff --git a/dlls/gdiplus/gdiplus_private.h b/dlls/gdiplus/gdiplus_private.h
index d036057..5bcedd9 100644
--- a/dlls/gdiplus/gdiplus_private.h
+++ b/dlls/gdiplus/gdiplus_private.h
@@ -19,6 +19,7 @@
 #ifndef __WINE_GP_PRIVATE_H_
 #define __WINE_GP_PRIVATE_H_
 
+#include <math.h>
 #include "windef.h"
 #include "gdiplus.h"
 
@@ -26,6 +27,16 @@ #define GP_DEFAULT_PENSTYLE (PS_GEOMETRI
 
 COLORREF ARGB2COLORREF(ARGB color);
 
+static inline INT roundr(REAL x)
+{
+    return (INT) floorf(x + 0.5);
+}
+
+static inline REAL deg2rad(REAL degrees)
+{
+    return M_PI * degrees / 180.0;
+}
+
 struct GpPen{
     UINT style;
     COLORREF color;
diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c
index af1089a..c32a412 100644
--- a/dlls/gdiplus/graphics.c
+++ b/dlls/gdiplus/graphics.c
@@ -34,16 +34,6 @@ #define TENSION_CONST (0.3)
 #define ANCHOR_WIDTH (2.0)
 #define MAX_ITERS (50)
 
-static inline INT roundr(REAL x)
-{
-    return (INT) floor(x+0.5);
-}
-
-static inline REAL deg2rad(REAL degrees)
-{
-    return (M_PI*2.0) * degrees / 360.0;
-}
-
 /* Converts angle (in degrees) to x/y coordinates */
 static void deg2xy(REAL angle, REAL x_0, REAL y_0, REAL *x, REAL *y)
 {
-- 
1.4.1


More information about the wine-patches mailing list