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

Method Frame

utilities/olcUTIL_Animate2D.h:76–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74 {
75 public:
76 inline Frame(const olc::Renderable* gfxSource, const geom2d::rect<int32_t>& rectSource = { {0,0},{0,0} })
77 : gfxImageSource(gfxSource), rectFrameSource(rectSource)
78 {
79 // If no source rectangle specified then use whole image source. Ignore in the event
80 // that a frame is set up as source-less
81 if(gfxSource && rectFrameSource.size.x == 0)
82 rectFrameSource.size = gfxSource->Sprite()->Size();
83 }
84
85 inline const olc::Renderable* GetSourceImage() const
86 {

Callers

nothing calls this directly

Calls 2

SizeMethod · 0.80
SpriteMethod · 0.45

Tested by

no test coverage detected