MCPcopy Create free account
hub / github.com/OpenRCT2/OpenRCT2 / Clear

Method Clear

src/openrct2/drawing/X8DrawingEngine.cpp:372–385  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

370}
371
372void X8DrawingContext::Clear(RenderTarget& rt, PaletteIndex paletteIndex)
373{
374 Guard::Assert(_isDrawing == true);
375
376 int32_t w = rt.width;
377 int32_t h = rt.height;
378 PaletteIndex* ptr = rt.bits;
379
380 for (int32_t y = 0; y < h; y++)
381 {
382 std::fill_n(ptr, w, paletteIndex);
383 ptr += w + rt.pitch;
384 }
385}
386
387void X8DrawingContext::FillRect(
388 RenderTarget& rt, PaletteIndex paletteIndex, int32_t left, int32_t top, int32_t right, int32_t bottom, bool crossHatch)

Callers 2

ResizeMethod · 0.45
GfxClearFunction · 0.45

Calls 1

AssertFunction · 0.85

Tested by

no test coverage detected