diff --git a/mscgraphics/basicmscgraph/mscArrowHead.py b/mscgraphics/basicmscgraph/mscArrowHead.py index 9f654baf444c6dad4519525bc17d17bc804af70b..3c3f124158de97c8f50b2497472e5db9f37471a0 100644 --- a/mscgraphics/basicmscgraph/mscArrowHead.py +++ b/mscgraphics/basicmscgraph/mscArrowHead.py @@ -25,9 +25,7 @@ # */ #****************************************************************************** from PySide.QtCore import Qt -from PySide.QtGui import QPen -from PySide.QtGui import QPainterPath -from PySide.QtGui import QGraphicsPathItem +from PySide.QtGui import QPen, QPainterPath, QGraphicsPathItem, QPainter class MscArrowHead(QGraphicsPathItem): @@ -80,3 +78,7 @@ class MscArrowHead(QGraphicsPathItem): self.drawOriginX = self.width self.drawOriginY = - (self.height / 2.0) self.updatePath() + + def paint(self, painter, option, widget): + painter.setRenderHint(QPainter.Antialiasing, True) + super(MscArrowHead, self).paint(painter, option, widget) diff --git a/mscgraphics/basicmscgraph/mscGraphCondition.py b/mscgraphics/basicmscgraph/mscGraphCondition.py index 50c33dfd0a24fc8d8f53effde0c08e6909e127f9..1e92e4363573c2392a7686e8be5a1a08f2662919 100644 --- a/mscgraphics/basicmscgraph/mscGraphCondition.py +++ b/mscgraphics/basicmscgraph/mscGraphCondition.py @@ -25,7 +25,7 @@ # Copyright (c) 2012 European Space Agency # #****************************************************************************** -from PySide.QtGui import QPainterPath, QPen, QBrush, QColor +from PySide.QtGui import QPainterPath, QPen, QBrush, QColor, QPainter from PySide.QtCore import Qt, Slot, QPointF from msccore import MscCondition @@ -133,7 +133,7 @@ class MscGraphCondition(MscGraphItem): # Paint Functions #************************************************************************** def initilizeGraphics(self): - self.color = Qt.blue + self.color = Qt.black self.pen = QPen(self.color, 1, Qt.SolidLine, Qt.RoundCap, Qt.RoundJoin) self.brush = QBrush(QColor(255, 255, 202)) @@ -154,12 +154,22 @@ class MscGraphCondition(MscGraphItem): Create the path of Timer """ self.path = QPainterPath() - self.path.addRect(-self.DefaultWidth / 2, 0, - self.DefaultWidth, self.DefaultHeight) + self.path.moveTo(5, 0) + self.path.lineTo(0, self.DefaultHeight / 2) + self.path.lineTo(5, self.DefaultHeight) + self.path.lineTo(self.DefaultWidth - 5, self.DefaultHeight) + self.path.lineTo(self.DefaultWidth, self.DefaultHeight / 2) + self.path.lineTo(self.DefaultWidth - 5, 0) + self.path.lineTo(5, 0) + self.path.translate(-self.DefaultWidth / 2, 0) + + #self.path.addRect(-self.DefaultWidth / 2, 0, + # self.DefaultWidth, self.DefaultHeight) # Set correct values of x, y, width and height self.updateBounding() def paint(self, painter, option, widget): painter.setPen(self.pen) painter.setBrush(self.brush) + painter.setRenderHint(QPainter.Antialiasing, True) painter.drawPath(self.path) diff --git a/mscgraphics/basicmscgraph/mscGraphInstance.py b/mscgraphics/basicmscgraph/mscGraphInstance.py index 34e3c92a23424fc6c12b991286a4dd8eaf832222..a2f8cad992719b0fb0eff0a125a6500f273e9063 100644 --- a/mscgraphics/basicmscgraph/mscGraphInstance.py +++ b/mscgraphics/basicmscgraph/mscGraphInstance.py @@ -24,8 +24,7 @@ # Copyright (c) 2012 European Space Agency # #****************************************************************************** -from PySide.QtGui import QPen, QGraphicsRectItem -from PySide.QtGui import QLinearGradient +from PySide.QtGui import QPen, QGraphicsRectItem, QLinearGradient, QPainter from PySide.QtCore import Qt, QPointF, Slot import msccore @@ -322,6 +321,7 @@ class MscGraphInstance(MscGraphItem): def paint(self, painter, option, widget=None): ''' Paint the instance Axis Symbol ''' painter.setPen(QPen(self.pen).setColor(Qt.black)) + painter.setRenderHint(QPainter.Antialiasing, True) painter.drawLine(0, 0, 0, self.bodySize) #**************************************************************************