MCPcopy Create free account
hub / github.com/OneLoneCoder/olcPixelGameEngine / FillRectDecal

Method FillRectDecal

olcPixelGameEngine.h:3811–3818  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3809 }
3810
3811 void PixelGameEngine::FillRectDecal(const olc::vf2d& pos, const olc::vf2d& size, const olc::Pixel col)
3812 {
3813 olc::vf2d vNewSize = size;// (size - olc::vf2d(0.375f, 0.375f)).ceil();
3814 std::array<olc::vf2d, 4> points = { { {pos}, {pos.x, pos.y + vNewSize.y}, {pos + vNewSize}, {pos.x + vNewSize.x, pos.y} } };
3815 std::array<olc::vf2d, 4> uvs = { {{0,0},{0,0},{0,0},{0,0}} };
3816 std::array<olc::Pixel, 4> cols = { {col, col, col, col} };
3817 DrawExplicitDecal(nullptr, points.data(), uvs.data(), cols.data(), 4);
3818 }
3819
3820 void PixelGameEngine::GradientFillRectDecal(const olc::vf2d& pos, const olc::vf2d& size, const olc::Pixel colTL, const olc::Pixel colBL, const olc::Pixel colBR, const olc::Pixel colTR)
3821 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected