File: shape.rst

package info (click to toggle)
python-docx 1.1.2%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 6,904 kB
  • sloc: xml: 25,311; python: 23,028; makefile: 176
file content (31 lines) | stat: -rw-r--r-- 613 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31

.. _shape_api:

Shape-related objects
=====================

.. currentmodule:: docx.shape


|InlineShapes| objects
----------------------

.. autoclass:: InlineShapes
   :members:
   :exclude-members: add_picture


|InlineShape| objects
---------------------

The ``width`` and ``height`` property of |InlineShape| provide a length object
that is an instance of |Length|. These instances behave like an int, but also
have built-in units conversion properties, e.g.::

    >>> inline_shape.height
    914400
    >>> inline_shape.height.inches
    1.0

.. autoclass:: InlineShape
   :members: height, type, width