mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-18 05:00:33 +01:00
Possibilite de faire des traits pointilles avec <ligne style="dashed"
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@14 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -123,7 +123,14 @@ bool ElementPerso::parseLigne(QDomElement &e, QPainter &qp) {
|
||||
if (!attributeIsAReal(e, QString("y2"), &y2)) return(false);
|
||||
/// @todo : gerer l'antialiasing (mieux que ca !) et le type de trait
|
||||
setQPainterAntiAliasing(&qp, e.attribute("antialias") == "true");
|
||||
qp.save();
|
||||
if (e.attribute("style") == "dashed") {
|
||||
QPen t = qp.pen();
|
||||
t.setStyle(Qt::DashLine);
|
||||
qp.setPen(t);
|
||||
}
|
||||
qp.drawLine(QLineF(x1, y1, x2, y2));
|
||||
qp.restore();
|
||||
return(true);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user