X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c99d6f997c48ab79dd301ca18b7a66d260a99636..4b04699b670b4ab4632229fa0264d154acd3bec1:/src/mac/carbon/dc.cpp?ds=sidebyside diff --git a/src/mac/carbon/dc.cpp b/src/mac/carbon/dc.cpp index de479fbeec..5778b90b07 100644 --- a/src/mac/carbon/dc.cpp +++ b/src/mac/carbon/dc.cpp @@ -19,6 +19,7 @@ #include "wx/dcmemory.h" #include "wx/region.h" #include "wx/image.h" +#include "wx/log.h" #if __MSL__ >= 0x6000 @@ -52,8 +53,6 @@ const double RAD2DEG = 180.0 / M_PI; const short kEmulatedMode = -1 ; const short kUnsupportedMode = -2 ; -#define wxMAC_EXPERIMENTAL_PATTERN 0 - wxMacPortSetter::wxMacPortSetter( const wxDC* dc ) : m_ph( (GrafPtr) dc->m_macPort ) { @@ -650,9 +649,13 @@ void wxDC::SetLogicalFunction( int function ) m_macPenInstalled = false ; } -void wxDC::DoFloodFill( wxCoord x, wxCoord y, const wxColour& col, - int style ) +extern void wxDoFloodFill(wxDC *dc, wxCoord x, wxCoord y, + const wxColour & col, int style); + +void wxDC::DoFloodFill(wxCoord x, wxCoord y, + const wxColour& col, int style) { + wxDoFloodFill(this, x, y, col, style); } bool wxDC::DoGetPixel( wxCoord x, wxCoord y, wxColour *col ) const @@ -1790,11 +1793,21 @@ void wxDC::MacInstallFont() const } +Pattern gHatchPatterns[] = +{ + { 0xFF , 0xFF , 0xFF , 0xFF , 0xFF , 0xFF , 0xFF , 0xFF } , + { 0x01 , 0x02 , 0x04 , 0x08 , 0x10 , 0x20 , 0x40 , 0x80 } , + { 0x80 , 0x40 , 0x20 , 0x10 , 0x08 , 0x04 , 0x02 , 0x01 } , + { 0x10 , 0x10 , 0x10 , 0xFF , 0x10 , 0x10 , 0x10 , 0x10 } , + { 0x00 , 0x00 , 0x00 , 0xFF , 0x00 , 0x00 , 0x00 , 0x00 } , + { 0x10 , 0x10 , 0x10 , 0x10 , 0x10 , 0x10 , 0x10 , 0x10 } , + { 0x81 , 0x42 , 0x24 , 0x18 , 0x18 , 0x24 , 0x42 , 0x81 } , +} ; + static void wxMacGetHatchPattern(int hatchStyle, Pattern *pattern) { - // we have our own pattern list now - int thePatListID = 128; - int theIndex; + int theIndex = 1 ; + switch(hatchStyle) { case wxBDIAGONAL_HATCH: @@ -1819,7 +1832,7 @@ static void wxMacGetHatchPattern(int hatchStyle, Pattern *pattern) theIndex = 1; // solid pattern break; } - GetIndPattern( pattern, thePatListID, theIndex); + *pattern = gHatchPatterns[theIndex-1] ; } void wxDC::MacInstallPen() const