Scheme Annotations (annotations)¶
Scheme Annotations¶
-
class
orangecanvas.scheme.annotations.BaseSchemeAnnotation¶ Bases:
PyQt5.QtCore.QObjectBase class for scheme annotations.
-
geometry_changed¶ Signal emitted when the geometry of the annotation changes
-
-
class
orangecanvas.scheme.annotations.SchemeArrowAnnotation(start_pos, end_pos, color='red', anchor=None, parent=None)¶ Bases:
orangecanvas.scheme.annotations.BaseSchemeAnnotationAn arrow annotation in the scheme.
-
set_line(start_pos, end_pos)¶ Set arrow lines start and end position (
(x, y)tuples).
-
start_pos¶ Start position of the arrow (base point).
-
end_pos¶ End position of the arrow (arrow head points toward the end).
-
set_geometry(geometry)¶ Set the geometry of the arrow as a start and end position tuples (e.g.
set_geometry(((0, 0), (100, 0))).
-
geometry¶ Return the start and end positions of the arrow.
-
set_color(color)¶ Set the fill color for the arrow as a string (#RGB, #RRGGBB, #RRRGGGBBB, #RRRRGGGGBBBB format or one of SVG color keyword names).
-
color¶ The arrow’s fill color.
-
-
class
orangecanvas.scheme.annotations.SchemeTextAnnotation(rect, text='', font=None, anchor=None, parent=None)¶ Bases:
orangecanvas.scheme.annotations.BaseSchemeAnnotationText annotation in the scheme.
-
text_changed(str)¶ Signal emitted when the annotation text changes.
-
set_rect(rect)¶ Set the text geometry bounding rectangle (
(x, y, width, height)tuple).
-
rect¶ Text bounding rectangle
-
set_geometry(rect)¶ Set the text geometry (same as
set_rect)
-
geometry¶ Text annotation geometry (same as
rect
-
set_text(text)¶ Set the annotation text.
-
text¶ Annotation text.
-
set_font(font)¶ Set the annotation’s font as a dictionary of font properties (at the moment only family and size are used).
>>> annotation.set_font({"family": "Helvetica", "size": 16})
-
font¶ Annotation’s font property dictionary.
-