git-svn-id: svn://db.shs.com.ru/libs@372 a8b55f48-bf90-11e4-a774-851b48703e85

This commit is contained in:
2018-04-05 13:58:54 +00:00
parent e5c53227de
commit dbb42c22f5
2 changed files with 11 additions and 11 deletions

View File

@@ -1,4 +1,4 @@
set Qt5_ROOT=d:\Qt\5.10.0\android_armv7\lib\cmake\ set Qt5_ROOT=d:\Qt\5.11.0\android_armv7\lib\cmake\
set Qt5_DIR=%Qt5_ROOT%\Qt5 set Qt5_DIR=%Qt5_ROOT%\Qt5
set Qt5LinguistTools_DIR=%Qt5_ROOT%\Qt5LinguistTools set Qt5LinguistTools_DIR=%Qt5_ROOT%\Qt5LinguistTools
set Qt5UiPlugin_DIR=%Qt5_ROOT%\Qt5UiPlugin set Qt5UiPlugin_DIR=%Qt5_ROOT%\Qt5UiPlugin

View File

@@ -1050,7 +1050,7 @@ void Graphic::drawGraphics() {
if (isHover) if (isHover)
ui->status->setText(tr("Cursor: ") + pointCoords(canvas2real(QPointF(curpos)))); ui->status->setText(tr("Cursor: ") + pointCoords(canvas2real(QPointF(curpos))));
QPointF srp = -selrect.topLeft(), cp; QPointF srp = -selrect.topLeft(), cp;
double sclx, scly, wid = canvas->width(), hei = canvas->height() - legy, pw; double sclx, scly, wid = canvas->width(), hei = canvas->height() - legy;
sclx = (wid - gridborder.x() - margins_.left() - margins_.width()) / selrect.width(); sclx = (wid - gridborder.x() - margins_.left() - margins_.width()) / selrect.width();
scly = (hei - gridborder.y() - margins_.top() - margins_.height()) / selrect.height(); scly = (hei - gridborder.y() - margins_.top() - margins_.height()) / selrect.height();
painter->setClipping(true); painter->setClipping(true);
@@ -1063,14 +1063,17 @@ void Graphic::drawGraphics() {
painter->resetTransform(); painter->resetTransform();
painter->setWorldMatrixEnabled(false); painter->setWorldMatrixEnabled(false);
QPolygonF cpol; QPolygonF cpol;
QPen pen;
for (int i = 0; i < graphics.size(); ++i) { for (int i = 0; i < graphics.size(); ++i) {
GraphicType & t(graphics[i]); GraphicType & t(graphics[i]);
QPolygonF & rpol(pause_ ? t.polyline_pause : t.polyline); QPolygonF & rpol(pause_ ? t.polyline_pause : t.polyline);
if (t.visible && !rpol.isEmpty()) { if (t.visible && !rpol.isEmpty()) {
pw = t.pen.widthF(); pen = t.pen;
if (qRound(pen.widthF()) == pen.widthF()) pen.setWidth(pen.width()*thick);
else pen.setWidthF(pen.widthF()*thick);
pen.setCosmetic(true);
if (t.lines) { if (t.lines) {
t.pen.setCosmetic(true); painter->setPen(pen);
painter->setPen(t.pen);
if (t.fill) { if (t.fill) {
cpol = rpol; cpol = rpol;
painter->setBrush(t.fill_color); painter->setBrush(t.fill_color);
@@ -1081,13 +1084,10 @@ void Graphic::drawGraphics() {
painter->drawPolyline(mat.map(rpol)); painter->drawPolyline(mat.map(rpol));
} }
if (t.points) { if (t.points) {
if (qRound(t.pointWidth) == t.pointWidth) t.pen.setWidth(qRound(t.pointWidth)); if (qRound(t.pointWidth) == t.pointWidth) pen.setWidth(qRound(t.pointWidth*thick));
else t.pen.setWidthF(t.pointWidth); else pen.setWidthF(t.pointWidth*thick);
t.pen.setCosmetic(true); painter->setPen(pen);
painter->setPen(t.pen);
painter->drawPoints(mat.map(rpol)); painter->drawPoints(mat.map(rpol));
if (qRound(pw) == pw) t.pen.setWidth(qRound(pw));
else t.pen.setWidthF(pw);
} }
} }
} }