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
This commit is contained in:
Vadim Zeitlin
2010-12-19 15:02:31 +00:00
parent 1c7ce07347
commit 4027f0d759

View File

@@ -798,9 +798,9 @@ void wxMacCoreGraphicsBrushData::CalculateShadingValues (void *info, const CGFlo
{ {
// Start // Start
out[0] = stops.comps[0].red; out[0] = stops.comps[0].red;
out[1] = stops.comps[1].green; out[1] = stops.comps[0].green;
out[2] = stops.comps[2].blue; out[2] = stops.comps[0].blue;
out[3] = stops.comps[3].alpha; out[3] = stops.comps[0].alpha;
} }
else if (f >= 1.0) else if (f >= 1.0)
{ {