From e69e8b1d09fb579316595b4e6a850e717358a8b1 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sun, 19 Jun 2011 19:03:33 +0000 Subject: TQt4 port kdegraphics This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegraphics@1237557 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kolourpaint/cursors/kpcursorlightcross.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'kolourpaint/cursors') diff --git a/kolourpaint/cursors/kpcursorlightcross.cpp b/kolourpaint/cursors/kpcursorlightcross.cpp index 34051dbf..dc52f9bd 100644 --- a/kolourpaint/cursors/kpcursorlightcross.cpp +++ b/kolourpaint/cursors/kpcursorlightcross.cpp @@ -42,7 +42,7 @@ enum PixelValue }; static void setPixel (unsigned char *colorBitmap, - unsigned char *maskBitmap, + unsigned char *tqmaskBitmap, int width, int y, int x, enum PixelValue pv) { @@ -52,32 +52,32 @@ static void setPixel (unsigned char *colorBitmap, const int MaskOpaque = 1; const int MaskTransparent = 0; - int colorValue, maskValue; + int colorValue, tqmaskValue; switch (pv) { case White: colorValue = ColorWhite; - maskValue = MaskOpaque; + tqmaskValue = MaskOpaque; break; case Black: colorValue = ColorBlack; - maskValue = MaskOpaque; + tqmaskValue = MaskOpaque; break; case Transparent: default: colorValue = ColorWhite; - maskValue = MaskTransparent; + tqmaskValue = MaskTransparent; break; } if (colorValue) colorBitmap [y * (width / 8) + (x / 8)] |= (1 << (x % 8)); - if (maskValue) - maskBitmap [y * (width / 8) + (x / 8)] |= (1 << (x % 8)); + if (tqmaskValue) + tqmaskBitmap [y * (width / 8) + (x / 8)] |= (1 << (x % 8)); } @@ -90,10 +90,10 @@ const TQCursor *kpMakeCursorLightCross () const int side = 24; const int byteSize = (side * side) / 8; unsigned char *colorBitmap = new unsigned char [byteSize]; - unsigned char *maskBitmap = new unsigned char [byteSize]; + unsigned char *tqmaskBitmap = new unsigned char [byteSize]; memset (colorBitmap, 0, byteSize); - memset (maskBitmap, 0, byteSize); + memset (tqmaskBitmap, 0, byteSize); const int oddSide = side - 1; const int strokeLen = oddSide * 3 / 8; @@ -104,7 +104,7 @@ const TQCursor *kpMakeCursorLightCross () #define X_(val) (val) #define Y_(val) (val) - #define DRAW(y,x) setPixel (colorBitmap, maskBitmap, side, (y), (x), pv) + #define DRAW(y,x) setPixel (colorBitmap, tqmaskBitmap, side, (y), (x), pv) // horizontal DRAW (Y_(side / 2), X_(1 + i)); DRAW (Y_(side / 2), X_(side - 1 - i)); @@ -118,9 +118,9 @@ const TQCursor *kpMakeCursorLightCross () } TQCursor *cursor = new TQCursor (TQBitmap (side, side, colorBitmap, true/*little endian bit order*/), - TQBitmap (side, side, maskBitmap, true/*little endian bit order*/)); + TQBitmap (side, side, tqmaskBitmap, true/*little endian bit order*/)); - delete [] maskBitmap; + delete [] tqmaskBitmap; delete [] colorBitmap; return cursor; -- cgit v1.2.3