X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c99d6f997c48ab79dd301ca18b7a66d260a99636..0fe5e8fea017ecb73f8aaa8ceb745feb269b3f79:/src/mac/dc.cpp diff --git a/src/mac/dc.cpp b/src/mac/dc.cpp index de479fbeec..bba19b5b4c 100644 --- a/src/mac/dc.cpp +++ b/src/mac/dc.cpp @@ -1790,11 +1790,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 +1829,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