Fix vertical alpha adjustment in wxPixelData<wxImage>::Offset().
Handle "y" parameter correctly when offsetting m_pAlpha, it was just ignored before, i.e. Offset(x, y) and OffsetY(y) always behaved as if y were 1.
This commit is contained in:
@@ -590,6 +590,7 @@ All (GUI):
|
||||
- Fix handling of fast consecutive clicks in wxRibbonBar (atobi).
|
||||
- Fix updating nested window scrollbars in some cases (sbrowne).
|
||||
- Fix wxPGChoices copy ctor (Snoits).
|
||||
- Fix wxPixelData<wxImage>::Offset() for alpha (Markus Rollmann).
|
||||
|
||||
wxGTK:
|
||||
|
||||
|
@@ -381,7 +381,7 @@ struct wxPixelDataOut<wxImage>
|
||||
{
|
||||
m_pRGB += data.GetRowStride()*y + PixelFormat::SizePixel*x;
|
||||
if ( m_pAlpha )
|
||||
m_pAlpha += data.GetWidth() + x;
|
||||
m_pAlpha += data.GetWidth()*y + x;
|
||||
}
|
||||
|
||||
// move x pixels to the right (again, no row wrapping)
|
||||
@@ -397,7 +397,7 @@ struct wxPixelDataOut<wxImage>
|
||||
{
|
||||
m_pRGB += data.GetRowStride()*y;
|
||||
if ( m_pAlpha )
|
||||
m_pAlpha += data.GetWidth();
|
||||
m_pAlpha += data.GetWidth()*y;
|
||||
}
|
||||
|
||||
// go to the given position
|
||||
|
Reference in New Issue
Block a user