brown.interface.text_interface

classes

An interface for graphical text objects.

__init__ (brown_object, pos, text, font, brush, origin_offset=None, scale_factor=1, clip_start_x=None, clip_width=None) permalink view source

overriden from Interface

arguments:

brown_object (Text): The brown object this belongs to

pos (Point[GraphicUnit] or tuple): The position of the path root relative to the document.

text (str): The text for the object

font (FontInterface): The font object for the text

brush (BrushInterface): The brush for the object.

scale_factor (float): A hard scaling factor.

clip_start_x (Unit or None): The local starting position for the clipping region. Use None to render from the start.

clip_width (Unit or None): The width of the clipping region. Use None to render to the end

properties

text: str The text for the object permalink view source

font: FontInterface The font object for the text permalink view source

origin_offset: Point A hard offset to be applied to the rendered text permalink view source

scale_factor: float A hard scale factor to be applied to the rendered text permalink view source

inherited properties

pos: Point[Unit] The absolute position of the object. permalink view source

This setter automatically propagates changes to the underlying Qt object.

x: Unit The absolute x position of the object permalink view source

This setter automatically propagates changes to the underlying Qt object.

y: Unit The absolute y position of the object permalink view source

This setter automatically propagates changes to the underlying Qt object.

pen: PenInterface The pen to draw outlines with. permalink view source

This setter automatically propagates changes to the underlying Qt object.

brush: BrushInterface The brush to fill shapes with. permalink view source

This setter automatically propagates changes to the underlying Qt object.

methods

render () permalink view source

Render the line to the scene.

returns:

None