- unsigned char * rgbBits = image.GetData();
- int w = image.GetWidth() ;
- int h = image.GetHeight() ;
- bool bHasMask = image.HasMask() ;
- int imagebitcount = (w*h)/8;
-
- unsigned char r, g, b ;
- unsigned char * bits = new unsigned char [imagebitcount];
- unsigned char * maskBits = new unsigned char [imagebitcount];
-
- int i,j, i8; unsigned char c, cMask;
- for (i=0; i<imagebitcount; i++)
- {
- bits[i] = 0;
- i8 = i * 8;
-
- cMask = 1;
- for (j=0; j<8; j++)
- {
- // possible overflow if we do the summation first ?
- c = rgbBits[(i8+j)*3]/3 + rgbBits[(i8+j)*3+1]/3 + rgbBits[(i8+j)*3+2]/3 ;
- //if average value is > mid grey
- if (c>127)
- bits[i] = bits[i] | cMask ;
- cMask = cMask * 2 ;
- }
- }
- if (bHasMask)
- {
- r = image.GetMaskRed() ;
- g = image.GetMaskGreen() ;
- b = image.GetMaskBlue() ;
+ int w = image.GetWidth() ;
+ int h = image.GetHeight();
+ bool bHasMask = image.HasMask();
+ int hotSpotX, hotSpotY;
+ GetHotSpot(image, hotSpotX, hotSpotY);
+ m_refData = new wxCursorRefData;
+ wxImage image_copy(image);