Beispiel #1
0
 def toRect(self):
     r = QRectF(
         self.hInterval.minValue(),
         self.vInterval.minValue(),
         self.hInterval.maxValue() - self.hInterval.minValue(),
         self.vInterval.maxValue() - self.vInterval.minValue(),
     )
     r = r.normalized()
     if self.hInterval.borderFlags() & QwtInterval.ExcludeMinimum:
         r.adjust(1, 0, 0, 0)
     if self.hInterval.borderFlags() & QwtInterval.ExcludeMaximum:
         r.adjust(0, 0, -1, 0)
     if self.vInterval.borderFlags() & QwtInterval.ExcludeMinimum:
         r.adjust(0, 1, 0, 0)
     if self.vInterval.borderFlags() & QwtInterval.ExcludeMaximum:
         r.adjust(0, 0, 0, -1)
     return r