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

Method replaceImage

src/doc/sprite.cpp:426–432  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

424// Images
425
426void Sprite::replaceImage(ObjectId curImageId, const ImageRef& newImage)
427{
428 for (auto cel : cels()) {
429 if (cel->image()->id() == curImageId)
430 cel->data()->setImage(newImage);
431 }
432}
433
434// TODO replace it with a images iterator
435void Sprite::getImages(std::vector<Image*>& images) const

Callers

nothing calls this directly

Calls 4

idMethod · 0.45
imageMethod · 0.45
setImageMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected