绘制ifc构件外轮廓
绘制ifc构件外轮廓
void VCWidget::drawOuterCurve(QPainter& mainPainter) { QPen routePen; routePen.setColor(QColor(0, 125, 255)); routePen.setWidth(4); mainPainter.setPen(routePen); if (indexDangerAreaPoints.size()>0) { for (int m = 0; m < indexDangerAreaPoints.size() - 1; m++) { QPoint indexPoint1 = indexDangerAreaPoints.at(m); QPoint indexPoint2 = indexDangerAreaPoints.at(m + 1); //QLine indexLine(indexPoint1, indexPoint2); qDebug() << "==" << indexPoint1.x() << " " << indexPoint1.y() << " " << indexPoint2.x() << " " << indexPoint2.y(); int p1_new_x = int(float(indexPoint1.x()*1.0f)*(this->scalingXValue)) + this->offset_x; int p1_new_y = int(float(indexPoint1.y()*1.0f)*(this->scalingYValue)) + this->offset_y; p1_new_y = this->pixmapHeight - p1_new_y; int p2_new_x = int(float(indexPoint2.x()*1.0f)*(this->scalingXValue)) + this->offset_x; int p2_new_y = int(float(indexPoint2.y()*1.0f)*(this->scalingYValue)) + this->offset_y; p2_new_y = this->pixmapHeight - p2_new_y; QPoint indexPoint_1(p1_new_x,p1_new_y); QPoint indexPoint_2(p2_new_x, p2_new_y); QLine indexLine(indexPoint_1, indexPoint_2); mainPainter.drawLine(indexLine); } } }
#########################
QQ 3087438119