CrossAnnotation module
- class lys.widgets.canvas.interface.CrossAnnotation.CrossAnnotation(canvas, pos, axis)[source]
Bases:
AnnotationWithLine
Interface to access cross annotations in canvas.
CrossAnnotation is usually generated by addCrossAnnotation method in canvas.
Several methods related to the appearance of line is inherited from
AnnotationData.AnnotationWithLine
- Parameters
canvas (Canvas) – canvas to which the line annotation is added.
pos (length 2 sequence) – The position of the annotation in the form of (x, y).
axis ('BottomLeft', 'BottomRight', 'TopLeft', or 'TopRight') – The axis to which the annotation is added.
Example:
from lys import display g = display() rect = g.canvas.addCrossAnnotation() rect.setLineColor("#ff0000")
- getPosition()[source]
Get the position of the annotation.
- Returns
The position of annotation in the form of (x, y)
- Return type
length 2 sequence
- positionChanged
PyqtSignal that is emitted when the region is changed.