From 6e4437255b603b5b25360481507099dd9b92f942 Mon Sep 17 00:00:00 2001 From: inmarket Date: Fri, 6 Sep 2013 12:29:06 +1000 Subject: GDISP revamp - stage 1 New low level driver interface: Only Win32 ported currently Significant reduction in GDISP stack usage Improved performance particularly for native streaming drivers New circle, ellipse, arc routines (draw and fill) that are significantly more efficient and don't overdraw New arc draw algorithm that measures angles correctly. New arc fill algorithm for that actually works without overdrawing or gaps. Much more to come... --- include/gmisc/gmisc.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/gmisc/gmisc.h') diff --git a/include/gmisc/gmisc.h b/include/gmisc/gmisc.h index 998dda50..5943e642 100644 --- a/include/gmisc/gmisc.h +++ b/include/gmisc/gmisc.h @@ -51,6 +51,7 @@ typedef int32_t fixed; */ #define FIXED(x) ((fixed)(x)<<16) /* @< integer to fixed */ #define NONFIXED(x) ((x)>>16) /* @< fixed to integer */ +#define FIXED0_5 32768 /* @< 0.5 as a fixed (used for rounding) */ #define FP2FIXED(x) ((fixed)((x)*65536.0)) /* @< floating point to fixed */ #define FIXED2FP(x) ((double)(x)/65536.0) /* @< fixed to floating point */ /* @} */ -- cgit v1.2.3 From 973e34089e33f06cfd9ed560db968870e22c2b8a Mon Sep 17 00:00:00 2001 From: inmarket Date: Tue, 24 Sep 2013 16:10:15 +1000 Subject: GDISP streaming bug fixes Win32 bitmap support Win32 Rotation is back to front. Need to check touch and other drivers. --- include/gmisc/gmisc.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'include/gmisc/gmisc.h') diff --git a/include/gmisc/gmisc.h b/include/gmisc/gmisc.h index 5943e642..ff3d0c76 100644 --- a/include/gmisc/gmisc.h +++ b/include/gmisc/gmisc.h @@ -184,6 +184,23 @@ extern "C" { /** @} */ #endif +#if GMISC_NEED_INVSQRT + /** + * @brief Fast inverse square root function (x^-1/2) + * @return The approximate inverse square root + * + * @param[in] n The number to find the inverse square root of + * + * @note This function generates an approximate result. Higher accuracy (at the expense + * of speed) can be obtained by modifying the source code (the necessary line + * is already there - just commented out). + * @note This function relies on the internal machine format of a float and a long. + * If your machine architecture is very unusual this function may not work. + * + * @api + */ + float invsqrt(float n); +#endif #ifdef __cplusplus } #endif -- cgit v1.2.3