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

Method writeLayerStructure

src/app/crash/write_document.cpp:123–138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

121 }
122
123 void writeLayerStructure(std::ofstream& s, Layer* lay) {
124 write32(s, static_cast<int>(lay->flags())); // Flags
125 write16(s, static_cast<int>(lay->type())); // Type
126 write_string(s, lay->name());
127
128 if (lay->type() == ObjectType::LayerImage) {
129 CelConstIterator it, begin = static_cast<const LayerImage*>(lay)->getCelBegin();
130 CelConstIterator end = static_cast<const LayerImage*>(lay)->getCelEnd();
131
132 // Cels
133 write32(s, static_cast<const LayerImage*>(lay)->getCelsCount());
134 for (it=begin; it != end; ++it) {
135 write32(s, (*it)->id());
136 }
137 }
138 }
139
140 void writeCel(std::ofstream& s, Cel* cel) {
141 write_cel(s, cel);

Callers

nothing calls this directly

Calls 8

write_stringFunction · 0.85
getCelBeginMethod · 0.80
getCelEndMethod · 0.80
getCelsCountMethod · 0.80
flagsMethod · 0.45
typeMethod · 0.45
nameMethod · 0.45
idMethod · 0.45

Tested by

no test coverage detected