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

Method Duplicate

olcPixelGameEngine.h:2135–2141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2133 }
2134
2135 olc::Sprite* Sprite::Duplicate()
2136 {
2137 olc::Sprite* spr = new olc::Sprite(width, height);
2138 std::memcpy(spr->GetData(), GetData(), width * height * sizeof(olc::Pixel));
2139 spr->modeSample = modeSample;
2140 return spr;
2141 }
2142
2143 olc::Sprite* Sprite::Duplicate(const olc::vi2d& vPos, const olc::vi2d& vSize)
2144 {

Callers

nothing calls this directly

Calls 2

GetDataMethod · 0.80
SetPixelMethod · 0.80

Tested by

no test coverage detected