Fixed an issue that GradientAngle doesn't work correctly in some GradientAngle values when AntiAlias=0.

This commit is contained in:
spx 2011-01-30 11:28:20 +00:00
parent 4b30714520
commit 251beb9e3a

View File

@ -827,8 +827,19 @@ bool CMeter::Draw(Graphics& graphics)
}
else
{
if (!m_AntiAlias)
{
// Fix the tiling issue in some GradientAngle values
graphics.SetPixelOffsetMode(PixelOffsetModeHalf);
}
LinearGradientBrush gradient(r, m_SolidColor, m_SolidColor2, m_SolidAngle, TRUE);
graphics.FillRectangle(&gradient, r);
if (!m_AntiAlias)
{
graphics.SetPixelOffsetMode(PixelOffsetModeDefault);
}
}
}