From 4027f0d759c4fe3160affbfd27148cb56a1e706d Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 19 Dec 2010 15:02:31 +0000 Subject: [PATCH] Fix initial gradient point calculation in wxOSX. This fixes the bug introduced in r63879 which used the wrong indices into the stops array resulting in visual artefacts in wxAUI, for example (and also possible crashes due to accessing out of bound array elements). Closes #12784. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66400 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/osx/carbon/graphics.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/osx/carbon/graphics.cpp b/src/osx/carbon/graphics.cpp index 1afba4921d..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) { -- 2.50.0