From 1485db17303ae0565b6025e5c60226cf8e9cc650 Mon Sep 17 00:00:00 2001 From: jiayulong <22806282@qq.com> Date: Thu, 18 Dec 2025 09:40:32 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BD=95=E4=BA=95=E5=89=96=E9=9D=A2=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0=E8=83=8C=E6=99=AF=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- logPlus/TransparentDraggableGeoLith.h | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/logPlus/TransparentDraggableGeoLith.h b/logPlus/TransparentDraggableGeoLith.h index 9de79f3..9dee0d0 100644 --- a/logPlus/TransparentDraggableGeoLith.h +++ b/logPlus/TransparentDraggableGeoLith.h @@ -97,6 +97,7 @@ public: //设置解释结论 void setLith(QString filePath, QString colorPath){ m_Lith = filePath; + m_Color = colorPath; } void drawLith(double left_Low, double right_Hight, double lY1, double lY2) @@ -129,6 +130,13 @@ public: painter.fillRect(fillRect,Qt::white); // //painter.setBrush(QBrush(QPixmap(colorPath))); + //颜色 + QString strLastColor = m_Color.right(4); + if(strLastColor.toLower()==".svg") + { + //拉伸 + DrawSVGSteched(&painter,m_Color,fillRect,0); + } // bool isStrech=false; // QSvgRenderer m_SvgRenderer; @@ -199,12 +207,19 @@ public: QPainter painter(&image); QRectF fillRect(0,0,newWidth, newHeight); painter.fillRect(fillRect,Qt::white); + //颜色 + QString strLastColor = m_Color.right(4); + if(strLastColor.toLower()==".svg") + { + //拉伸 + DrawSVGSteched(&painter,m_Color,fillRect,0); + } // bool isOne=true; bool isStech=true; bool isHorizon=false; float cm = g_dPixelPerCm;//一厘米对应的像素个数 - QColor bkColor = QColor(255,255,255,255); + QColor bkColor = QColor(255,255,255,0); float GeoResult = m_drawGeo.seleGeo("岩性符号库", basename, &painter, fillRect, isOne, isStech, isHorizon, cm, bkColor);