diff --git a/NameCreater/NameCreater.pro.user b/NameCreater/NameCreater.pro.user index 5395f79..0a3177e 100644 --- a/NameCreater/NameCreater.pro.user +++ b/NameCreater/NameCreater.pro.user @@ -1,6 +1,6 @@ - + EnvironmentId @@ -92,7 +92,7 @@ Desktop Qt 5.15.2 clang 64bit Desktop Qt 5.15.2 clang 64bit qt.qt5.5152.clang_64_kit - 0 + 1 0 0 @@ -245,7 +245,7 @@ true false true - /Users/shouchih_chen/Documents/namecreater/build-NameCreater-Desktop_Qt_5_15_2_clang_64bit-Debug/NameCreater.app/Contents/MacOS + /Users/shouchih_chen/Documents/namecreater/build-NameCreater-Desktop_Qt_5_15_2_clang_64bit-Release/NameCreater.app/Contents/MacOS 1 diff --git a/NameCreater/_exp/name.csv b/NameCreater/_exp/name.csv index dd37321..ecd7ed8 100644 --- a/NameCreater/_exp/name.csv +++ b/NameCreater/_exp/name.csv @@ -1,7 +1,7 @@ name_1,bg_type -艾小沙,r -夏小,g -吳苡,b +艾小沙,1 +夏小,2 +吳苡需,y 尹小,y 艾小,r 夏小,g @@ -10,4 +10,4 @@ name_1,bg_type 艾小,r 夏小,g 艾小,2 -夏小,1 +夏小天,1 diff --git a/NameCreater/main.cpp b/NameCreater/main.cpp index eb010ba..21fc857 100644 --- a/NameCreater/main.cpp +++ b/NameCreater/main.cpp @@ -57,18 +57,18 @@ static QPointF NAME_POS[] = { }; static QPointF NAME_POS_NUMBER[] = { - QPointF(240, 410), QPointF(372, 1422), - QPointF(564, 410), QPointF(694, 1422), - QPointF(883, 410), QPointF(1014, 1422), - QPointF(1205, 410), QPointF(1337, 1402), - QPointF(1532, 410), QPointF(1663, 1402), + QPointF(240, 370), QPointF(372, 1442), + QPointF(564, 370), QPointF(694, 1442), + QPointF(883, 370), QPointF(1014, 1442), + QPointF(1205, 380), QPointF(1337, 1402), + QPointF(1532, 380), QPointF(1663, 1402), QPointF(1854, 410), QPointF(1987, 1402), QPointF(2176, 410), QPointF(2309, 1402), QPointF(2498, 410), QPointF(2629, 1402), QPointF(2821, 410), QPointF(2952, 1402), QPointF(3145, 410), QPointF(3276, 1402), - QPointF(1268, 2012), QPointF(2240, 1880), - QPointF(1268, 2334), QPointF(2240, 2202), + QPointF(1228, 2012), QPointF(2280, 1880), + QPointF(1228, 2334), QPointF(2280, 2202), }; static int NAME_POS_COUNT = sizeof(NAME_POS) / sizeof(NAME_POS[0]); @@ -205,9 +205,9 @@ int main(int argc, char* argv[]) - QImage image(BG_SAMPLE_PATH); + /*QImage image(BG_SAMPLE_PATH); QGraphicsPixmapItem* bgItem = new QGraphicsPixmapItem(QPixmap::fromImage(image)); - scene.addItem(bgItem); + scene.addItem(bgItem);*/ for (int n = 0; n < nameList.length(); n++) { @@ -215,9 +215,9 @@ int main(int argc, char* argv[]) NameInfo_t name_info = nameList.at(n); QImage name_image(name_info.bg_path); if (idx == 0) { - /*QGraphicsRectItem* bg_item = new QGraphicsRectItem(0, 0, 3508, 2482); + QGraphicsRectItem* bg_item = new QGraphicsRectItem(0, 0, 3508, 2482); bg_item->setBrush(QBrush(QColor(255, 255, 255))); - scene.addItem(bg_item);*/ + scene.addItem(bg_item); } @@ -310,13 +310,12 @@ int main(int argc, char* argv[]) QString file_name = QString("%1_.jpg").arg(QString::number(export_times + 1)); saveToImage(file_name, &scene); export_times++; - view.show(); - break; - //scene.clear(); + + scene.clear(); } } - + QMessageBox msgBox; msgBox.setText(QString().asprintf("Export Finshed. Count:%d", export_times)); @@ -325,5 +324,5 @@ int main(int argc, char* argv[]) font_res.close(); - return a.exec(); + return 0; }