File: index.rst

package info (click to toggle)
python-docx 0.8.11%2Bdfsg1-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 6,640 kB
  • sloc: xml: 25,311; python: 21,911; makefile: 168
file content (68 lines) | stat: -rw-r--r-- 1,935 bytes parent folder | download
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68

Shapes (in general)
===================

A graphical object that appears in a Word document is known as a *shape*.
A shape can be *inline* or *floating*. An inline shape appears on a text
baseline as though it were a character glyph and affects the line height.
A floating shape appears at an arbitrary location on the document and text may
wrap around it. Several types of shape can be placed, including a picture, a
chart, and a drawing canvas.

The graphical object itself is placed in a container, and it is the container
that determines the placement of the graphic. The same graphical object can be
placed inline or floating by changing its container. The graphic itself is
unaffected.

In addition to this overview, there are the following more specialized
feature analyses:

.. toctree::
   :titlesonly:

   shapes-inline
   shapes-inline-size
   picture


MS API
------

Access to shapes is provided by the Shapes and InlineShapes properties on the
Document object.

The API for a floating shape overlaps that for an inline shapes, but there are
substantial differences. The following properties are some of those common to
both:

* Fill
* Glow
* HasChart
* HasSmartArt
* Height
* Shadow
* Hyperlink
* PictureFormat (providing brightness, color, crop, transparency, contrast)
* Type (Chart, LockedCanvas, Picture, SmartArt, etc.)
* Width


Resources
---------

* `Document Members (Word) on MSDN`_
* `InlineShape Members (Word) on MSDN`_
* `InlineShapes Members (Word) on MSDN`_
* `Shape Members (Word) on MSDN`_

.. _Document Members (Word) on MSDN:
   http://msdn.microsoft.com/en-us/library/office/ff840898.aspx

.. _InlineShape Members (Word) on MSDN:
   http://msdn.microsoft.com/en-us/library/office/ff840794.aspx

.. _InlineShapes Members (Word) on MSDN:
   http://msdn.microsoft.com/en-us/library/office/ff836984.aspx

.. _Shape Members (Word) on MSDN:
   http://msdn.microsoft.com/en-us/library/office/ff195191.aspx