First on a renderings


Here flowers and birds each word is a picture, the realization process is to get the corresponding picture through the input text, and then tile to draw on a picture, the format can be set three or five a line, the input text synthesis into a picture, and then the picture is displayed in the center of the interface effect


The following is an implementation using C++. Theoretically, as long as the language supports picture rendering, it can be transplanted or implemented by itself

/ / draw the code void CArt: : Paint (Graphics & v_graphics) {v_graphics. TranslateTransform (m_nFrameWidth f / 2.0, M_nFrameHeight / 2.0 f); If (m_pbgImage && m_vetFileList.size() < 4) v_graphics.drawImage (m_pbgImage, Rect(-m_nbgWidth / 2.0f), -m_nbgheight / 2.0f, m_nbgWidth + 0.0f, m_nBgHeight + 0.0f), 0, 0, m_nbgWidth, m_nBgHeight, UnitPixel); If (m_pfontImage) v_graphics. drawImage (m_pfontImage, Rect(-m_nfontImage / 2.5f, -m_nfontImage / 2.5f, -m_nfontImage / 2.5f, -m_nfontImage / 2.5f, drawImage (-m_nfontImage / 2.5f, -m_nfontImage / 2.5f, M_nFontWidth + 0.0F, m_nFontHeight + 0.0F), 0, 0, m_nFontWidth, m_nFontHeight, UnitPixel); Bool CArt::LoadImage(string strURI) {bool bRet = false; int length = strURI.length(); if (length && length % 6 == 0) { m_vetFileList.clear(); SAFE_DELETE(m_pFontImage); for (int i = 0; i < length; i += 6) { string str = strURI.substr(i, 6); str += ".jpg"; m_vetFileList.emplace_back(str); } int size = m_vetFileList.size(); if (size > 0) { m_nFontWidth = FONT_WIDTH * size; m_nFontHeight = FONT_HEIGHT; m_pFontImage = new Bitmap(m_nFontWidth, m_nFontHeight); Graphics gs(m_pFontImage); for (int i = 0; i < size; i++) { string strFileName = g_strWorkDir + "/art/data/" + m_vetFileList[i]; CString strImage(strFileName.c_str()); Bitmap image(strImage); gs.DrawImage(&image, Rect(i * FONT_WIDTH, 0, FONT_WIDTH, FONT_HEIGHT), 0, 0, FONT_WIDTH, FONT_HEIGHT, UnitPixel); } Update(); bRet = true; } } return bRet; } void onBtnAdd () {cDuistring strText = m_Pedittext ->GetText(); string strUtf8; bool bRet = tools::UnicodeToUtf8(strText.GetData(), strUtf8); if (bRet) { string strURI = encodeURIComponent(strUtf8, false); CArt* pArt = new CArt(); if (pArt) { bool bRet = pArt->LoadImage(strURI); }}}