X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/bc78039c5fb9aabc354b20de5ef72fa6b0370d58..3dcc2231fabc5c9ea718ae90d13fbc8dd70c3489:/src/mac/carbon/dccg.cpp diff --git a/src/mac/carbon/dccg.cpp b/src/mac/carbon/dccg.cpp index 0dc5b87d74..9a6cd4390d 100755 --- a/src/mac/carbon/dccg.cpp +++ b/src/mac/carbon/dccg.cpp @@ -408,7 +408,7 @@ protected : } } - ~ImagePattern() + virtual ~ImagePattern() { if ( m_image ) CGImageRelease( m_image ) ; @@ -523,7 +523,7 @@ public : } protected : - ~HatchPattern() {} + virtual ~HatchPattern() {} CGRect m_imageBounds ; int m_hatch ; @@ -552,8 +552,8 @@ void wxMacCGContext::SetPen( const wxPen &pen ) if ( stroke ) { - RGBColor col = MAC_WXCOLORREF( pen.GetColour().GetPixel() ) ; - CGContextSetRGBStrokeColor( m_cgContext , col.red / 65536.0 , col.green / 65536.0 , col.blue / 65536.0 , 1.0 ) ; + CGContextSetRGBStrokeColor( m_cgContext , pen.GetColour().Red() / 255.0 , pen.GetColour().Green() / 255.0 , + pen.GetColour().Blue() / 255.0 , pen.GetColour().Alpha() / 255.0 ) ; // TODO: * m_dc->m_scaleX CGFloat penWidth = pen.GetWidth(); @@ -678,8 +678,8 @@ void wxMacCGContext::SetPen( const wxPen &pen ) CGContextSetStrokeColorSpace( m_cgContext , patternSpace ) ; wxMacCFRefHolder pattern( *( new HatchPattern( pen.GetStyle() , CGContextGetCTM( m_cgContext ) ) ) ); - RGBColor col = MAC_WXCOLORREF( pen.GetColour().GetPixel() ) ; - CGFloat colorArray[4] = { col.red / 65536.0 , col.green / 65536.0 , col.blue / 65536.0 , 1.0 } ; + CGFloat colorArray[4] = { pen.GetColour().Red() / 255.0 , pen.GetColour().Green() / 255.0 , + pen.GetColour().Blue() / 255.0 , pen.GetColour().Alpha() / 255.0 } ; CGContextSetStrokePattern( m_cgContext, pattern , colorArray ) ; } @@ -731,8 +731,8 @@ void wxMacCGContext::SetBrush( const wxBrush &brush ) { if ( brush.GetStyle() == wxSOLID ) { - RGBColor col = MAC_WXCOLORREF( brush.GetColour().GetPixel() ) ; - CGContextSetRGBFillColor( m_cgContext , col.red / 65536.0 , col.green / 65536.0 , col.blue / 65536.0 , 1.0 ) ; + CGContextSetRGBFillColor( m_cgContext , brush.GetColour().Red() / 255.0 , brush.GetColour().Green() / 255.0 , + brush.GetColour().Blue() / 255.0 , brush.GetColour().Alpha() / 255.0 ) ; } else if ( brush.IsHatch() ) { @@ -740,8 +740,8 @@ void wxMacCGContext::SetBrush( const wxBrush &brush ) CGContextSetFillColorSpace( m_cgContext , patternSpace ) ; wxMacCFRefHolder pattern( *( new HatchPattern( brush.GetStyle() , CGContextGetCTM( m_cgContext ) ) ) ); - RGBColor col = MAC_WXCOLORREF( brush.GetColour().GetPixel() ) ; - CGFloat colorArray[4] = { col.red / 65536.0 , col.green / 65536.0 , col.blue / 65536.0 , 1.0 } ; + CGFloat colorArray[4] = { brush.GetColour().Red() / 255.0 , brush.GetColour().Green() / 255.0 , + brush.GetColour().Blue() / 255.0 , brush.GetColour().Alpha() / 255.0 } ; CGContextSetFillPattern( m_cgContext, pattern , colorArray ) ; }