lpod.shapes

class lpod.shapes.draw_group(native_element, cache=None)

Bases: lpod.element.odf_element

get_name()
set_name(name)
class lpod.shapes.odf_shape(native_element, cache=None)

Bases: lpod.element.odf_element

get_formatted_text(context)
get_id()
get_layer()
get_position()

Get the position of the shape relative to its anchor point.

Position is a (left, top) tuple with items including the unit, e.g. (‘10cm’, ‘15cm’).

Return: (str, str)

get_presentation_class()
get_size()

Get the size of the shape.

Size is a (width, height) tuple with items including the unit, e.g. (‘10cm’, ‘15cm’).

Return: (str, str)

get_style()
get_text_style()
set_id(name)
set_layer(name)
set_position(position)

Set the position of the shape relative to its anchor point.

Position is a (left, top) tuple with items including the unit, e.g. (‘10cm’, ‘15cm’).

Arguments:

position – (str, str)
set_size(size)

Set the size of the shape.

Size is a (width, height) tuple with items including the unit, e.g. (‘10cm’, ‘15cm’). The dimensions can be None.

Arguments:

size – (str, str)
set_style(name)
set_text_style(name)
lpod.shapes.odf_create_connector(style=None, text_style=None, shape_id=None, layer=None, connected_shapes=None, glue_points=None, p1=None, p2=None)

Create a ellipse shape.

Arguments:

style – unicode

text_style – unicode

shape_id – unicode

layer – str

connected_shapes – (shape, shape)

glue_points – (point, point)

p1 – (str, str)

p2 – (str, str)

Return: odf_element

lpod.shapes.odf_create_ellipse(style=None, text_style=None, shape_id=None, layer=None, size=('1cm', '1cm'), position=None)

Create a ellipse shape.

Arguments:

style – unicode

text_style – unicode

shape_id – unicode

layer – str

size – (str, str)

position – (str, str)

Return: odf_element

lpod.shapes.odf_create_line(style=None, text_style=None, shape_id=None, layer=None, p1=None, p2=None)

Create a line shape.

Arguments:

style – unicode

text_style – unicode

shape_id – unicode

layer – str

p1 – (str, str)

p2 – (str, str)

Return: odf_element

lpod.shapes.odf_create_rectangle(style=None, text_style=None, shape_id=None, layer=None, size=('1cm', '1cm'), position=None)

Create a rectangle shape.

Arguments:

style – unicode

text_style – unicode

shape_id – unicode

layer – str

size – (str, str)

position – (str, str)

Return: odf_element

lpod.shapes.register_shape(tagname, cls)

Previous topic

lpod.section

Next topic

lpod.smil

This Page