diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-19 19:03:33 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-19 19:03:33 +0000 |
commit | e69e8b1d09fb579316595b4e6a850e717358a8b1 (patch) | |
tree | a24fc20865f65772f530d16177520190594ffdd2 /kolourpaint/cursors | |
parent | eecec9afb81fdebb0f22e9da22635874c403f854 (diff) | |
download | tdegraphics-e69e8b1d09fb579316595b4e6a850e717358a8b1.tar.gz tdegraphics-e69e8b1d09fb579316595b4e6a850e717358a8b1.zip |
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
Diffstat (limited to 'kolourpaint/cursors')
-rw-r--r-- | kolourpaint/cursors/kpcursorlightcross.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
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; |