Fix oval frames not drawing in 32-bit color mode

This commit is contained in:
elasota
2020-07-03 17:32:26 -04:00
parent 7069f4bf82
commit e05f37a28d

View File

@@ -1224,6 +1224,25 @@ void DrawSurface::FrameEllipse(const Rect &rect, PortabilityLayer::ResolveCachin
} }
} }
break; break;
case GpPixelFormats::kRGB32:
{
const uint32_t color32 = cacheColor.GetRGBAColor().AsUInt32();
for (;;)
{
const PortabilityLayer::Vec2i pt = plotter.GetPoint();
if (constraintRect32.Contains(pt))
{
const size_t pixelIndex = static_cast<size_t>(pt.m_y - portRect.top) * pitch + static_cast<size_t>(pt.m_x - portRect.left) * 4;
*reinterpret_cast<uint32_t*>(pixData + pixelIndex) = color32;
}
if (plotter.PlotNext() == PortabilityLayer::PlotDirection_Exhausted)
break;
}
}
break;
default: default:
PL_NotYetImplemented(); PL_NotYetImplemented();
return; return;