AnnotationData module
- class lys.widgets.canvas.interface.AnnotationData.AnnotationData(canvas, name, axis)[source]
Bases:
CanvasPart- getAxis()[source]
Get axis to which the annotation is added.
- Returns:
The axis (‘BottomLeft’, ‘BottomRight’, ‘TopLeft’, or ‘TopRight’)
- Return type:
str
- getVisible()[source]
Get the visibility of the annotaion.
- Returns:
When it is True, the annotation is shown.
- Return type:
bool
- getZOrder()[source]
Get the z order of the annotaion.
- Returns:
The z order of the annotation.
- Return type:
int
- loadAppearance(appearance)[source]
Load appearnce from dictionary.
- Parameters:
appearance (dict) – The dictionary that include appearance information, which is usually generated by
saveAppearance()method.
- saveAppearance()[source]
Save appearnce as dictionary.
- Returns:
The dictionary that include appearance information, which is usually used by
loadAppearance()method.- Return type:
dict
- setName(name)[source]
Set the name of the annotation.
- Parameters:
name (str) – The name of annotation.
- class lys.widgets.canvas.interface.AnnotationData.AnnotationWithLine(canvas, name, axis)[source]
Bases:
AnnotationData- getLineColor()[source]
Get the color of the line.
- Returns:
The color string such as ‘#ff0000’
- Return type:
str
- getLineStyle()[source]
Get the style of the line.
- Returns:
The line style (‘solid’, ‘dashed’, ‘dashdot’, ‘dotted’, or ‘none’).
- Return type:
str
- setLineColor(color)[source]
Set the color of the line.
- Parameters:
color (str) – The color string such as ‘#ff0000’