diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-02-24 17:43:19 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-02-24 17:43:19 +0000 |
commit | 0292059f4a16434600564cfa3f0ad2309a508a54 (patch) | |
tree | d95953cd53011917c4df679b96aedca39401b54f /kernel/kls_ttf/ftview/gblany.h | |
download | libksquirrel-0292059f4a16434600564cfa3f0ad2309a508a54.tar.gz libksquirrel-0292059f4a16434600564cfa3f0ad2309a508a54.zip |
Added libksquirrel for KDE3
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/libraries/libksquirrel@1095624 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kernel/kls_ttf/ftview/gblany.h')
-rw-r--r-- | kernel/kls_ttf/ftview/gblany.h | 133 |
1 files changed, 133 insertions, 0 deletions
diff --git a/kernel/kls_ttf/ftview/gblany.h b/kernel/kls_ttf/ftview/gblany.h new file mode 100644 index 0000000..a0bc750 --- /dev/null +++ b/kernel/kls_ttf/ftview/gblany.h @@ -0,0 +1,133 @@ +/* check that all macros are correctly set + */ +#ifndef GDST_INCR +#error "GDST_INCR not defined" +#endif + +#ifndef GDST_TYPE +#error "GDST_TYPE not defined" +#endif + +#ifndef GDST_READ +#error "GDST_READ not defined" +#endif + +#ifdef GBLENDER_STORE_BYTES +# ifndef GDST_STOREB +# error "GDST_STOREB not defined" +# endif +#else +# ifndef GDST_STOREP +# error "GDST_STOREP not defined" +# endif +#endif /* !STORE_BYTES */ + +#ifndef GDST_STOREC +#error "GDST_STOREC not defined" +#endif + +#ifndef GDST_COPY +#error "GDST_COPY not defined" +#endif + +#ifndef GDST_COPY_VAR +#error "GDST_COPY_VAR not defined" +#endif + +#undef GCONCAT +#undef GCONCATX +#define GCONCAT(x,y) GCONCATX(x,y) +#define GCONCATX(x,y) x ## y + + +#include <stdio.h> + +static void +GCONCAT( _gblender_blit_gray8_, GDST_TYPE )( GBlenderBlit blit, + GBlenderPixel color ) +{ + + GBlender blender = blit->blender; + int r = (color >> 16) & 255; + int g = (color >> 8) & 255; + int b = (color) & 255; + + GDST_COPY_VAR + +#include "gblcolor.h" + +} + + +static void +GCONCAT( _gblender_blit_hrgb_, GDST_TYPE )( GBlenderBlit blit, + GBlenderPixel color ) +{ + GBlender blender = blit->blender; + int r = (color >> 16) & 255; + int g = (color >> 8) & 255; + int b = (color) & 255; + + GDST_COPY_VAR + +#include "gblhrgb.h" +} + + +static void +GCONCAT( _gblender_blit_hbgr_, GDST_TYPE )( GBlenderBlit blit, + GBlenderPixel color ) +{ + GBlender blender = blit->blender; + int r = (color >> 16) & 255; + int g = (color >> 8) & 255; + int b = (color) & 255; + + GDST_COPY_VAR + +#include "gblhbgr.h" +} + + +static void +GCONCAT( _gblender_blit_vrgb_, GDST_TYPE )( GBlenderBlit blit, + GBlenderPixel color ) +{ + GBlender blender = blit->blender; + int r = (color >> 16) & 255; + int g = (color >> 8) & 255; + int b = (color) & 255; + + GDST_COPY_VAR + +#include "gblvrgb.h" +} + +static void +GCONCAT( _gblender_blit_vbgr_, GDST_TYPE )( GBlenderBlit blit, + GBlenderPixel color ) +{ + GBlender blender = blit->blender; + int r = (color >> 16) & 255; + int g = (color >> 8) & 255; + int b = (color) & 255; + + GDST_COPY_VAR + +#include "gblvbgr.h" +} + +/* unset the macros, to prevent accidental re-use + */ + +#undef GCONCATX +#undef GCONCAT +#undef GDST_TYPE +#undef GDST_INCR +#undef GDST_READ +#undef GDST_COPY +#undef GDST_STOREB +#undef GDST_STOREP +#undef GDST_STOREC +#undef GDST_COPY_VAR +/* EOF */ |