MCPcopy Create free account
hub / github.com/Paper2Poster/Paper2Poster / set_shape_position

Function set_shape_position

utils/pptx_utils.py:1577–1590  ·  view source on GitHub ↗

Move or resize an existing shape to the specified position/dimensions. :param shape: The shape object to be repositioned. :param left_inch: New left position in inches. :param top_inch: New top position in inches. :param width_inch: New width in inches. :param height_in

(shape, left_inch, top_inch, width_inch, height_inch)

Source from the content-addressed store, hash-verified

1575 return shape
1576
1577def set_shape_position(shape, left_inch, top_inch, width_inch, height_inch):
1578 """
1579 Move or resize an existing shape to the specified position/dimensions.
1580
1581 :param shape: The shape object to be repositioned.
1582 :param left_inch: New left position in inches.
1583 :param top_inch: New top position in inches.
1584 :param width_inch: New width in inches.
1585 :param height_inch: New height in inches.
1586 """
1587 shape.left = Inches(left_inch)
1588 shape.top = Inches(top_inch)
1589 shape.width = Inches(width_inch)
1590 shape.height = Inches(height_inch)
1591
1592def add_line_simple(slide, name, left_inch, top_inch, length_inch, thickness=2, color=(0, 0, 0), orientation="horizontal"):
1593 """

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected