X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ca1f7cb56322e35a5bf3d9612cd14c128246947c..8584b0e64b273273bad122d28b10176bd5a3bc84:/src/osx/carbon/graphics.cpp?ds=sidebyside diff --git a/src/osx/carbon/graphics.cpp b/src/osx/carbon/graphics.cpp index 8f4e0cde52..1a07e2278d 100644 --- a/src/osx/carbon/graphics.cpp +++ b/src/osx/carbon/graphics.cpp @@ -798,9 +798,9 @@ void wxMacCoreGraphicsBrushData::CalculateShadingValues (void *info, const CGFlo { // Start out[0] = stops.comps[0].red; - out[1] = stops.comps[1].green; - out[2] = stops.comps[2].blue; - out[3] = stops.comps[3].alpha; + out[1] = stops.comps[0].green; + out[2] = stops.comps[0].blue; + out[3] = stops.comps[0].alpha; } else if (f >= 1.0) { @@ -826,9 +826,9 @@ void wxMacCoreGraphicsBrushData::CalculateShadingValues (void *info, const CGFlo CGFloat fact = diff / range; out[0] = stops.comps[i - 1].red + (stops.comps[i].red - stops.comps[i - 1].red) * fact; - out[0] = stops.comps[i - 1].green + (stops.comps[i].green - stops.comps[i - 1].green) * fact; - out[0] = stops.comps[i - 1].blue + (stops.comps[i].blue - stops.comps[i - 1].blue) * fact; - out[0] = stops.comps[i - 1].alpha + (stops.comps[i].alpha - stops.comps[i - 1].alpha) * fact; + out[1] = stops.comps[i - 1].green + (stops.comps[i].green - stops.comps[i - 1].green) * fact; + out[2] = stops.comps[i - 1].blue + (stops.comps[i].blue - stops.comps[i - 1].blue) * fact; + out[3] = stops.comps[i - 1].alpha + (stops.comps[i].alpha - stops.comps[i - 1].alpha) * fact; } } @@ -1082,7 +1082,7 @@ wxGraphicsObjectRefData *wxMacCoreGraphicsMatrixData::Clone() const // concatenates the matrix void wxMacCoreGraphicsMatrixData::Concat( const wxGraphicsMatrixData *t ) { - m_matrix = CGAffineTransformConcat(m_matrix, *((CGAffineTransform*) t->GetNativeMatrix()) ); + m_matrix = CGAffineTransformConcat(*((CGAffineTransform*) t->GetNativeMatrix()), m_matrix ); } // sets the matrix to the respective values @@ -1545,6 +1545,11 @@ public : m_userOffset = CGContextConvertSizeToUserSpace( m_cg, CGSizeMake( 0.5 , 0.5 ) ); CGContextTranslateCTM( m_cg, m_userOffset.width , m_userOffset.height ); } + else + { + m_userOffset = CGSizeMake(0.0, 0.0); + } + } ~wxQuartzOffsetHelper( ) { @@ -2625,7 +2630,7 @@ void wxMacCoreGraphicsContext::ConcatTransform( const wxGraphicsMatrix& matrix ) if ( m_cgContext ) CGContextConcatCTM( m_cgContext, *(CGAffineTransform*) matrix.GetNativeMatrix()); else - m_windowTransform = CGAffineTransformConcat(m_windowTransform, *(CGAffineTransform*) matrix.GetNativeMatrix()); + m_windowTransform = CGAffineTransformConcat(*(CGAffineTransform*) matrix.GetNativeMatrix(), m_windowTransform); } // sets the transform of this context