#pragma once #include "geometry/rect2d.hpp" #include "geometry/packer.hpp" #include "coding/writer.hpp" #include "base/base.hpp" #include "std/vector.hpp" #include "std/list.hpp" #include "std/string.hpp" #include "std/map.hpp" #include #include #include #include #include #include #include #include class QImage; namespace gil = boost::gil; namespace tools { class SkinGenerator { public: struct SymbolInfo { QSize m_size; QString m_fullFileName; QString m_symbolID; m2::Packer::handle_t m_handle; SymbolInfo() {} SymbolInfo(QSize size, QString const & fullFileName, QString const & symbolID) : m_size(size), m_fullFileName(fullFileName), m_symbolID(symbolID) {} }; typedef vector TSymbols; struct SkinPageInfo { TSymbols m_symbols; int m_width; int m_height; string m_fileName; string m_dir; string m_suffix; m2::Packer m_packer; }; private: bool m_needColorCorrection; QSvgRenderer m_svgRenderer; typedef vector TSkinPages; TSkinPages m_pages; bool m_overflowDetected; void markOverflow(); public: SkinGenerator(bool needColorCorrection); //void processFont(string const & fileName, string const & skinName, vector const & fontSizes, int symbolScale); void processSymbols(string const & symbolsDir, string const & skinName, vector const & symbolSizes, vector const & suffix); bool renderPages(uint32_t maxSize); bool writeToFile(string const & skinName); void writeToFileNewStyle(string const & skinName); }; } // namespace tools