minor argument type checking
This commit is contained in:
parent
0de0bf4c44
commit
60ce541df6
|
@ -232,6 +232,9 @@ class ROI(GraphicsObject):
|
||||||
multiple change functions to be called sequentially while minimizing processing overhead
|
multiple change functions to be called sequentially while minimizing processing overhead
|
||||||
and repeated signals. Setting ``update=False`` also forces ``finish=False``.
|
and repeated signals. Setting ``update=False`` also forces ``finish=False``.
|
||||||
"""
|
"""
|
||||||
|
if update not in (True, False):
|
||||||
|
raise TypeError("update argument must be bool")
|
||||||
|
|
||||||
if y is None:
|
if y is None:
|
||||||
pos = Point(pos)
|
pos = Point(pos)
|
||||||
else:
|
else:
|
||||||
|
@ -249,6 +252,8 @@ class ROI(GraphicsObject):
|
||||||
"""Set the size of the ROI. May be specified as a QPoint, Point, or list of two values.
|
"""Set the size of the ROI. May be specified as a QPoint, Point, or list of two values.
|
||||||
See setPos() for an explanation of the update and finish arguments.
|
See setPos() for an explanation of the update and finish arguments.
|
||||||
"""
|
"""
|
||||||
|
if update not in (True, False):
|
||||||
|
raise TypeError("update argument must be bool")
|
||||||
size = Point(size)
|
size = Point(size)
|
||||||
self.prepareGeometryChange()
|
self.prepareGeometryChange()
|
||||||
self.state['size'] = size
|
self.state['size'] = size
|
||||||
|
@ -259,6 +264,8 @@ class ROI(GraphicsObject):
|
||||||
"""Set the angle of rotation (in degrees) for this ROI.
|
"""Set the angle of rotation (in degrees) for this ROI.
|
||||||
See setPos() for an explanation of the update and finish arguments.
|
See setPos() for an explanation of the update and finish arguments.
|
||||||
"""
|
"""
|
||||||
|
if update not in (True, False):
|
||||||
|
raise TypeError("update argument must be bool")
|
||||||
self.state['angle'] = angle
|
self.state['angle'] = angle
|
||||||
tr = QtGui.QTransform()
|
tr = QtGui.QTransform()
|
||||||
#tr.rotate(-angle * 180 / np.pi)
|
#tr.rotate(-angle * 180 / np.pi)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user