Scheme Annotations (annotations
)¶
Scheme Annotations¶
-
class
orangecanvas.scheme.annotations.
BaseSchemeAnnotation
[source]¶ Bases:
PyQt5.QtCore.QObject
Base 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)[source]¶ Bases:
orangecanvas.scheme.annotations.BaseSchemeAnnotation
An arrow annotation in the scheme.
-
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)[source]¶ 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)[source]¶ 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='', content_type='text/plain', font=None, anchor=None, parent=None)[source]¶ Bases:
orangecanvas.scheme.annotations.BaseSchemeAnnotation
Text annotation in the scheme.
-
text_changed
(str)¶ Signal emitted when the annotation text changes.
-
rect
¶ Text bounding rectangle
-
geometry
¶ Text annotation geometry (same as
rect
)
-
text
¶ Annotation text.
Deprecated since version Use: content instead.
-
content_type
¶ Return the annotations’ content type.
Currently this will be ‘text/plain’, ‘text/html’ or ‘text/rst’.
-
content
¶ The annotation content.
How the content is interpreted/displayed depends on content_type.
-
set_font
(font)[source]¶ Set the annotation’s default 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.
-