void ClientObjectType::addMaterial(const ClientItem *item, size_t qty) { _materials.set(item, qty); auto isConstructionImageAlreadyInitialized = bool{_constructionImage.normal}; if (!isConstructionImageAlreadyInitialized) _constructionImage = ImageSet("Images/Objects/" + _imageFile + "-construction.png"); }
void IconDes::Smoothen() { WithColorizeLayout<TopWindow> dlg; CtrlLayoutOKCancel(dlg, "Smoothen"); PlaceDlg(dlg); dlg.level.MinMax(0, 1); dlg.level <<= 0.75; dlg.level <<= dlg.Breaker(); Image bk = ImageStart(); for(;;) { ImageSet(Upp::Smoothen(bk, 0.4 * minmax((double)~dlg.level + 0.01, 0.01, 1.1))); switch(dlg.Run()) { case IDCANCEL: ImageSet(bk); return; case IDOK: return; } } }
void add(list<ImageSet> &aSets, const cElFilename &aFilename) { ImageSet::Info info(aFilename); list<ImageSet>::iterator it = aSets.begin(); while (it != aSets.end() && it->mInfo != info) it++; if (it == aSets.end()) { aSets.push_back(ImageSet(info)); it = --aSets.rbegin().base(); } it->mFilenames.push_back(aFilename); }
void ClientObjectType::addTransformImage(const std::string &filename) { _transformImages.push_back(ImageSet("Images/Objects/" + filename + ".png")); }