Turns out this was right after all. Thanks to Rene for the explanations.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38087 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Adrien Destugues 2010-08-13 14:08:15 +00:00
parent d84da869d5
commit 78e421e05e

View File

@ -903,7 +903,7 @@ Painter::FillRect(const BRect& r, const BGradient& gradient) const
if (gradient.GetType() == BGradient::TYPE_LINEAR
&& (fDrawingMode == B_OP_COPY || fDrawingMode == B_OP_OVER)) {
const BGradientLinear* linearGradient
= static_cast<const BGradientLinear*>(&gradient);
= dynamic_cast<const BGradientLinear*>(&gradient);
if (linearGradient->Start().x == linearGradient->End().x
// TODO: Remove this second check once the optimized method
// handled "upside down" gradients as well...