Changeset 7aaa0b0ec7 in tspsg for src/mainwindow.cpp
- Timestamp:
- Aug 30, 2010, 7:48:47 PM (14 years ago)
- Branches:
- 0.1.3.145-beta1-symbian, 0.1.4.170-beta2-bb10, appveyor, imgbot, master, readme
- Children:
- 672e522ba2
- Parents:
- 43c29c04ba
- git-author:
- Oleksii Serdiuk <contacts@…> (08/30/10 19:48:47)
- git-committer:
- Oleksii Serdiuk <contacts@…> (06/29/12 19:45:57)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mainwindow.cpp
r43c29c04ba r7aaa0b0ec7 257 257 QString html = solutionText->document()->toHtml("UTF-8"), 258 258 img = fi.completeBaseName() + "." + format; 259 html.replace(QRegExp("<img\\s+src=\"tspsg://graph.pic\""), QString("<img src=\"%1\" width=\"%2\" height=\"%3\" alt=\"%4\"").arg(img).arg(graph.width() + 2).arg(graph.height() + 2).arg(tr("Solution Graph")));259 html.replace(QRegExp("<img\\s+src=\"tspsg://graph.pic\""), QString("<img src=\"%1\" alt=\"%2\"").arg(img, tr("Solution Graph"))); 260 260 261 261 // Saving solution text as HTML … … 280 280 } else { 281 281 #endif // NOSVG && QT_VERSION >= 0x040500 282 QImage i(graph.width() + 2, graph.height() + 2, QImage::Format_ARGB32);282 QImage i(graph.width(), graph.height(), QImage::Format_ARGB32); 283 283 i.fill(0x00FFFFFF); 284 284 QPainter p; … … 735 735 if (settings->value("Output/ShowGraph", DEF_SHOW_GRAPH).toBool()) { 736 736 pic.begin(&graph); 737 pic.setRenderHint(QPainter::Antialiasing); 738 pic.setFont(settings->value("Output/Font", QFont(getDefaultFont(), 9)).value<QFont>()); 737 pic.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); 738 QFont font = settings->value("Output/Font", QFont(getDefaultFont(), 9)).value<QFont>(); 739 // font.setBold(true); 740 font.setPointSizeF(font.pointSizeF() * 2); 741 pic.setFont(font); 739 742 pic.setBrush(QBrush(QColor(Qt::white))); 743 QPen pen = pic.pen(); 744 pen.setWidth(2); 745 pic.setPen(pen); 740 746 pic.setBackgroundMode(Qt::OpaqueMode); 741 747 } … … 878 884 QTextImageFormat img; 879 885 img.setName("tspsg://graph.pic"); 886 img.setWidth(i.width() / 2); 887 img.setHeight(i.height() / 2); 880 888 881 889 cur.setPosition(imgpos); … … 1041 1049 void MainWindow::drawNode(QPainter &pic, int nstep, bool left, SStep *step) 1042 1050 { 1043 const int r = 35;1051 const int r = 70; 1044 1052 qreal x, y; 1045 1053 if (step != NULL)
Note: See TracChangeset
for help on using the changeset viewer.