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

Method GradientFillRectDecal

olcPixelGameEngine.h:3820–3826  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {
3822 std::array<olc::vf2d, 4> points = { { {pos}, {pos.x, pos.y + size.y}, {pos + size}, {pos.x + size.x, pos.y} } };
3823 std::array<olc::vf2d, 4> uvs = { {{0,0},{0,0},{0,0},{0,0}} };
3824 std::array<olc::Pixel, 4> cols = { {colTL, colBL, colBR, colTR} };
3825 DrawExplicitDecal(nullptr, points.data(), uvs.data(), cols.data(), 4);
3826 }
3827
3828 void PixelGameEngine::FillTriangleDecal(const olc::vf2d& p0, const olc::vf2d& p1, const olc::vf2d& p2, const olc::Pixel col)
3829 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected