MCPcopy Create free account
hub / github.com/LibreSprite/LibreSprite / sequenceGetColor

Method sequenceGetColor

src/app/file/file.cpp:778–791  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

776}
777
778void FileOp::sequenceGetColor(int index, int* r, int* g, int* b) const
779{
780 uint32_t c;
781
782 ASSERT(index >= 0);
783 if (index >= 0 && index < m_seq.palette->size())
784 c = m_seq.palette->getEntry(index);
785 else
786 c = rgba(0, 0, 0, 255); // Black color
787
788 *r = rgba_getr(c);
789 *g = rgba_getg(c);
790 *b = rgba_getb(c);
791}
792
793void FileOp::sequenceSetAlpha(int index, int a)
794{

Callers 4

onSaveMethod · 0.80
onSaveMethod · 0.80
onSaveMethod · 0.80
onSaveMethod · 0.80

Calls 6

rgba_getrFunction · 0.85
rgba_getgFunction · 0.85
rgba_getbFunction · 0.85
getEntryMethod · 0.80
rgbaFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected