Text¶
-
class
ocvproto.misc.text.
Text
(val: str = None, *, face: str = None, scale: float = None, color: Union[int, str, Tuple[int, int, int]] = None, pos: Tuple[int, int] = None, weight: int = None)¶ Represents a text that can be placed into a frame.
Parameters: - val – Text value itself.
- face – Font face alias (see .face_map keys). Default: normal
- scale – Scale factor. Default: 1
- color – Color RGB tuple or alias (see COLORS). Default: white
- pos – Position tuple (x, y) in frame from top-left. Default: (20, 20)
- weight – Line thickness. Default: 1
-
put_on
(frame: Union[<sphinx.ext.autodoc.importer._MockObject object at 0x7f886e166da0>, Frame], text: str = None, *, pos: Tuple[int, int] = None)¶ Applies text to the frame.
Parameters: - frame – Frame to apply text to.
- text – Text value to set on frame. If not set, value from initializer is used.
- pos – Position tuple (x, y) in frame from top-left. Default: (20, 20)
-
classmethod
put_on_demo
(frame: Union[<sphinx.ext.autodoc.importer._MockObject object at 0x7f886e166da0>, Frame], text: str = 'Test Text 1 2 3 4 5')¶ Demonstrates available font faces applying all of them to the frame.
Parameters: - frame – Frame to apply text to.
- text – Text value to on frame.