+ // for these the text fore (and back for MASK_OPAQUE) colors are used
+ wxBitmap* bitmap = m_brush.GetStipple() ;
+ int width = bitmap->GetWidth() ;
+ int height = bitmap->GetHeight() ;
+ int depth = bitmap->GetDepth() ;
+ if ( m_brush.GetStyle() == wxSTIPPLE )
+ {
+ GWorldPtr gw = bitmap->GetHBITMAP() ;
+ if ( width == 8 && height == 8 && depth == 1)
+ {
+ Pattern pat ;
+ LockPixels( GetGWorldPixMap( gw ) ) ;
+ BitMap* gwbitmap = (BitMap*) *GetGWorldPixMap( gw ) ; // since the color depth is 1 it is a BitMap
+ int alignment = gwbitmap->rowBytes & 0x7FFF ;
+ UInt8 *gwbits = (UInt8*) gwbitmap->baseAddr ;
+ for ( int i = 0 ; i < 8 ; ++i )
+ {
+ pat.pat[i] = gwbits[i*alignment+0] ;
+ }
+ UnlockPixels( GetGWorldPixMap( gw ) ) ;
+
+ ::PenPat( &pat ) ;
+ }
+ else
+ {
+ ::PenPat(GetQDGlobalsBlack(&blackColor));
+ }
+ }
+ else if (m_brush.GetStyle() == wxSTIPPLE_MASK_OPAQUE )
+ {
+ ::RGBForeColor( &m_textForegroundColour.GetPixel() );
+ ::RGBForeColor( &m_textBackgroundColour.GetPixel() );
+ ::PenPat(GetQDGlobalsBlack(&blackColor));
+ }
+ }
+ else
+ {
+ ::PenPat(GetQDGlobalsBlack(&blackColor));