- M_BITMAPDATA->m_hBitmap = wxMacCreateGWorld( the_width , the_height , no_bits ) ;
- M_BITMAPDATA->m_ok = (M_BITMAPDATA->m_hBitmap != NULL ) ;
+ MAC_WXHBITMAP(M_BITMAPDATA->m_hBitmap) = wxMacCreateGWorld( the_width , the_height , no_bits ) ;
+ M_BITMAPDATA->m_ok = (MAC_WXHBITMAP(M_BITMAPDATA->m_hBitmap) != NULL ) ;
- SetGWorld( M_BITMAPDATA->m_hBitmap , NULL ) ;
- LockPixels( GetGWorldPixMap( M_BITMAPDATA->m_hBitmap ) ) ;
+ SetGWorld( MAC_WXHBITMAP(M_BITMAPDATA->m_hBitmap) , NULL ) ;
+ LockPixels( GetGWorldPixMap( MAC_WXHBITMAP(M_BITMAPDATA->m_hBitmap) ) ) ;
wxBitmap ret( rect.width, rect.height, GetDepth() );
wxASSERT_MSG( ret.Ok(), wxT("GetSubBitmap error") );
wxBitmap ret( rect.width, rect.height, GetDepth() );
wxASSERT_MSG( ret.Ok(), wxT("GetSubBitmap error") );
submask = wxMacCreateGWorld(rect.width, rect.height, 1);
LockPixels(GetGWorldPixMap(mask));
LockPixels(GetGWorldPixMap(submask));
submask = wxMacCreateGWorld(rect.width, rect.height, 1);
LockPixels(GetGWorldPixMap(mask));
LockPixels(GetGWorldPixMap(submask));
M_BITMAPDATA->m_bitmapType = kMacBitmapTypeGrafWorld ;
M_BITMAPDATA->m_hBitmap = wxMacCreateGWorld( w , h , d ) ;
M_BITMAPDATA->m_bitmapType = kMacBitmapTypeGrafWorld ;
M_BITMAPDATA->m_hBitmap = wxMacCreateGWorld( w , h , d ) ;
- LockPixels( GetGWorldPixMap(maskBitmap.GetHBITMAP()) );
- SetGWorld(maskBitmap.GetHBITMAP(), NULL);
+ LockPixels( GetGWorldPixMap( (GWorldPtr) maskBitmap.GetHBITMAP()) );
+ SetGWorld( (GWorldPtr) maskBitmap.GetHBITMAP(), NULL);
wxMask *mask = GetMask();
GetGWorld( &origPort, &origDevice );
wxMask *mask = GetMask();
GetGWorld( &origPort, &origDevice );
- LockPixels(GetGWorldPixMap(GetHBITMAP()));
- SetGWorld( GetHBITMAP(), NULL);
+ LockPixels(GetGWorldPixMap( (GWorldPtr) GetHBITMAP()));
+ SetGWorld( (GWorldPtr) GetHBITMAP(), NULL);
// dst PixMap - no drawing occurs
&portRect, // srcRect - it will be recorded and compressed -
&portRect, // dstRect - into the picture that is open -
srcCopy,NULL); // copyMode and no clip region
}
ClosePicture(); // We are done recording the picture
// dst PixMap - no drawing occurs
&portRect, // srcRect - it will be recorded and compressed -
&portRect, // dstRect - into the picture that is open -
srcCopy,NULL); // copyMode and no clip region
}
ClosePicture(); // We are done recording the picture
SetGWorld( origPort , origDev ) ;
return picture; // return our groovy pict handle
SetGWorld( origPort , origDev ) ;
return picture; // return our groovy pict handle
m_maskBitmap = wxMacCreateGWorld(bitmap.GetWidth(), bitmap.GetHeight(), 1);
Rect rect = { 0,0, bitmap.GetHeight(), bitmap.GetWidth() };
m_maskBitmap = wxMacCreateGWorld(bitmap.GetWidth(), bitmap.GetHeight(), 1);
Rect rect = { 0,0, bitmap.GetHeight(), bitmap.GetWidth() };
- LockPixels( GetGWorldPixMap(m_maskBitmap) );
- LockPixels( GetGWorldPixMap(bitmap.GetHBITMAP()) );
- CopyBits(GetPortBitMapForCopyBits(bitmap.GetHBITMAP()),
- GetPortBitMapForCopyBits(m_maskBitmap),
+ LockPixels( GetGWorldPixMap( (GWorldPtr) m_maskBitmap) );
+ LockPixels( GetGWorldPixMap( (GWorldPtr) bitmap.GetHBITMAP()) );
+ CopyBits(GetPortBitMapForCopyBits( (GWorldPtr) bitmap.GetHBITMAP()),
+ GetPortBitMapForCopyBits( (GWorldPtr) m_maskBitmap),
&rect, &rect, srcCopy, 0);
&rect, &rect, srcCopy, 0);
- UnlockPixels( GetGWorldPixMap(m_maskBitmap) );
- UnlockPixels( GetGWorldPixMap(bitmap.GetHBITMAP()) );
+ UnlockPixels( GetGWorldPixMap( (GWorldPtr) m_maskBitmap) );
+ UnlockPixels( GetGWorldPixMap( (GWorldPtr) bitmap.GetHBITMAP()) );
wxCHECK_MSG( bitmap.Ok(), false, wxT("Illigal bitmap"));
m_maskBitmap = wxMacCreateGWorld( bitmap.GetWidth() , bitmap.GetHeight() , 1 );
wxCHECK_MSG( bitmap.Ok(), false, wxT("Illigal bitmap"));
m_maskBitmap = wxMacCreateGWorld( bitmap.GetWidth() , bitmap.GetHeight() , 1 );
- LockPixels( GetGWorldPixMap( m_maskBitmap ) );
- LockPixels( GetGWorldPixMap( bitmap.GetHBITMAP() ) );
- RGBColor maskColor = colour.GetPixel();
+ LockPixels( GetGWorldPixMap( (GWorldPtr) m_maskBitmap ) );
+ LockPixels( GetGWorldPixMap( (GWorldPtr) bitmap.GetHBITMAP() ) );
+ RGBColor maskColor = MAC_WXCOLORREF(colour.GetPixel());
// this is not very efficient, but I can't think
// of a better way of doing it
// this is not very efficient, but I can't think
// of a better way of doing it
if (col.red == maskColor.red && col.green == maskColor.green && col.blue == maskColor.blue)
{
SetCPixel( w , h , &colors[0] ) ;
if (col.red == maskColor.red && col.green == maskColor.green && col.blue == maskColor.blue)
{
SetCPixel( w , h , &colors[0] ) ;
GetGWorld( &origPort, &origDevice);
//Set port to mask and see if it masked (1) or not ( 0 )
GetGWorld( &origPort, &origDevice);
//Set port to mask and see if it masked (1) or not ( 0 )
- SetGWorld(m_maskBitmap, NULL);
- LockPixels(GetGWorldPixMap(m_maskBitmap));
+ SetGWorld( (GWorldPtr) m_maskBitmap, NULL);
+ LockPixels(GetGWorldPixMap( (GWorldPtr) m_maskBitmap));