python-pptx2 2.13.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (175) hide show
  1. pptx2/__init__.py +152 -0
  2. pptx2/_color.py +75 -0
  3. pptx2/_slide_importer.py +597 -0
  4. pptx2/_svg.py +155 -0
  5. pptx2/_template_applier.py +292 -0
  6. pptx2/_textstyle.py +187 -0
  7. pptx2/accessibility.py +365 -0
  8. pptx2/action.py +270 -0
  9. pptx2/animation.py +2237 -0
  10. pptx2/api.py +49 -0
  11. pptx2/audit.py +258 -0
  12. pptx2/chart/__init__.py +0 -0
  13. pptx2/chart/analytics.py +381 -0
  14. pptx2/chart/axis.py +543 -0
  15. pptx2/chart/category.py +200 -0
  16. pptx2/chart/chart.py +670 -0
  17. pptx2/chart/data.py +864 -0
  18. pptx2/chart/datalabel.py +406 -0
  19. pptx2/chart/legend.py +86 -0
  20. pptx2/chart/marker.py +70 -0
  21. pptx2/chart/palettes.py +129 -0
  22. pptx2/chart/plot.py +462 -0
  23. pptx2/chart/point.py +101 -0
  24. pptx2/chart/quick_layouts.py +325 -0
  25. pptx2/chart/series.py +334 -0
  26. pptx2/chart/xlsx.py +272 -0
  27. pptx2/chart/xmlwriter.py +1845 -0
  28. pptx2/compose/__init__.py +28 -0
  29. pptx2/compose/from_spec.py +1094 -0
  30. pptx2/design/__init__.py +8 -0
  31. pptx2/design/components.py +607 -0
  32. pptx2/design/figures.py +389 -0
  33. pptx2/design/layout.py +370 -0
  34. pptx2/design/recipes.py +1967 -0
  35. pptx2/design/style.py +209 -0
  36. pptx2/design/tokens.py +915 -0
  37. pptx2/diagrams.py +754 -0
  38. pptx2/dml/__init__.py +0 -0
  39. pptx2/dml/chtfmt.py +40 -0
  40. pptx2/dml/color.py +496 -0
  41. pptx2/dml/effect.py +909 -0
  42. pptx2/dml/fill.py +691 -0
  43. pptx2/dml/line.py +287 -0
  44. pptx2/dml/picture.py +212 -0
  45. pptx2/dml/three_d.py +381 -0
  46. pptx2/enum/__init__.py +0 -0
  47. pptx2/enum/action.py +71 -0
  48. pptx2/enum/animation.py +31 -0
  49. pptx2/enum/base.py +218 -0
  50. pptx2/enum/chart.py +574 -0
  51. pptx2/enum/dml.py +740 -0
  52. pptx2/enum/lang.py +685 -0
  53. pptx2/enum/presentation.py +133 -0
  54. pptx2/enum/shapes.py +1029 -0
  55. pptx2/enum/text.py +230 -0
  56. pptx2/exc.py +42 -0
  57. pptx2/formats.py +139 -0
  58. pptx2/geometry.py +420 -0
  59. pptx2/inherit.py +109 -0
  60. pptx2/lint.py +2256 -0
  61. pptx2/math.py +177 -0
  62. pptx2/media.py +197 -0
  63. pptx2/opc/__init__.py +0 -0
  64. pptx2/opc/constants.py +332 -0
  65. pptx2/opc/oxml.py +188 -0
  66. pptx2/opc/package.py +762 -0
  67. pptx2/opc/packuri.py +109 -0
  68. pptx2/opc/serialized.py +296 -0
  69. pptx2/opc/shared.py +20 -0
  70. pptx2/opc/spec.py +45 -0
  71. pptx2/oxml/__init__.py +555 -0
  72. pptx2/oxml/action.py +53 -0
  73. pptx2/oxml/chart/__init__.py +0 -0
  74. pptx2/oxml/chart/axis.py +337 -0
  75. pptx2/oxml/chart/chart.py +481 -0
  76. pptx2/oxml/chart/datalabel.py +253 -0
  77. pptx2/oxml/chart/legend.py +72 -0
  78. pptx2/oxml/chart/marker.py +61 -0
  79. pptx2/oxml/chart/plot.py +365 -0
  80. pptx2/oxml/chart/series.py +425 -0
  81. pptx2/oxml/chart/shared.py +220 -0
  82. pptx2/oxml/coreprops.py +288 -0
  83. pptx2/oxml/dml/__init__.py +0 -0
  84. pptx2/oxml/dml/color.py +135 -0
  85. pptx2/oxml/dml/effect.py +213 -0
  86. pptx2/oxml/dml/fill.py +316 -0
  87. pptx2/oxml/dml/line.py +12 -0
  88. pptx2/oxml/dml/three_d.py +110 -0
  89. pptx2/oxml/ns.py +135 -0
  90. pptx2/oxml/presentation.py +313 -0
  91. pptx2/oxml/shapes/__init__.py +19 -0
  92. pptx2/oxml/shapes/autoshape.py +467 -0
  93. pptx2/oxml/shapes/connector.py +107 -0
  94. pptx2/oxml/shapes/graphfrm.py +347 -0
  95. pptx2/oxml/shapes/groupshape.py +329 -0
  96. pptx2/oxml/shapes/picture.py +270 -0
  97. pptx2/oxml/shapes/shared.py +577 -0
  98. pptx2/oxml/simpletypes.py +1027 -0
  99. pptx2/oxml/slide.py +563 -0
  100. pptx2/oxml/table.py +650 -0
  101. pptx2/oxml/text.py +815 -0
  102. pptx2/oxml/theme.py +36 -0
  103. pptx2/oxml/xmlchemy.py +717 -0
  104. pptx2/package.py +222 -0
  105. pptx2/parts/__init__.py +0 -0
  106. pptx2/parts/chart.py +95 -0
  107. pptx2/parts/coreprops.py +167 -0
  108. pptx2/parts/diagram.py +37 -0
  109. pptx2/parts/embeddedpackage.py +93 -0
  110. pptx2/parts/image.py +275 -0
  111. pptx2/parts/media.py +37 -0
  112. pptx2/parts/presentation.py +136 -0
  113. pptx2/parts/slide.py +371 -0
  114. pptx2/presentation.py +408 -0
  115. pptx2/py.typed +0 -0
  116. pptx2/render.py +586 -0
  117. pptx2/section.py +272 -0
  118. pptx2/shapes/__init__.py +26 -0
  119. pptx2/shapes/autoshape.py +442 -0
  120. pptx2/shapes/base.py +1078 -0
  121. pptx2/shapes/connector.py +297 -0
  122. pptx2/shapes/freeform.py +337 -0
  123. pptx2/shapes/graphfrm.py +316 -0
  124. pptx2/shapes/group.py +264 -0
  125. pptx2/shapes/picture.py +422 -0
  126. pptx2/shapes/placeholder.py +468 -0
  127. pptx2/shapes/shapetree.py +2027 -0
  128. pptx2/shared.py +82 -0
  129. pptx2/skill/SKILL.md +450 -0
  130. pptx2/skill/__init__.py +78 -0
  131. pptx2/skill/__main__.py +64 -0
  132. pptx2/skill/references/animations.md +189 -0
  133. pptx2/skill/references/basics.md +421 -0
  134. pptx2/skill/references/charts.md +254 -0
  135. pptx2/skill/references/compose.md +234 -0
  136. pptx2/skill/references/design.md +366 -0
  137. pptx2/skill/references/effects.md +249 -0
  138. pptx2/skill/references/end-to-end-deck.md +231 -0
  139. pptx2/skill/references/geometry-and-arrows.md +334 -0
  140. pptx2/skill/references/lint.md +275 -0
  141. pptx2/skill/references/math.md +86 -0
  142. pptx2/skill/references/picture-effects.md +129 -0
  143. pptx2/skill/references/render.md +151 -0
  144. pptx2/skill/references/smart-art.md +75 -0
  145. pptx2/skill/references/space-aware-authoring.md +249 -0
  146. pptx2/skill/references/tables.md +244 -0
  147. pptx2/skill/references/theme.md +127 -0
  148. pptx2/skill/references/three-d.md +109 -0
  149. pptx2/skill/references/transitions.md +100 -0
  150. pptx2/slide.py +1244 -0
  151. pptx2/smart_art.py +220 -0
  152. pptx2/spec.py +633 -0
  153. pptx2/table.py +1181 -0
  154. pptx2/table_styles.py +184 -0
  155. pptx2/templates/default.pptx +0 -0
  156. pptx2/templates/docx-icon.emf +0 -0
  157. pptx2/templates/generic-icon.emf +0 -0
  158. pptx2/templates/notes.xml +23 -0
  159. pptx2/templates/notesMaster.xml +352 -0
  160. pptx2/templates/pptx-icon.emf +0 -0
  161. pptx2/templates/theme.xml +321 -0
  162. pptx2/templates/xlsx-icon.emf +0 -0
  163. pptx2/text/__init__.py +0 -0
  164. pptx2/text/fonts.py +482 -0
  165. pptx2/text/layout.py +374 -0
  166. pptx2/text/text.py +1272 -0
  167. pptx2/theme.py +721 -0
  168. pptx2/types.py +36 -0
  169. pptx2/util.py +263 -0
  170. python_pptx2-2.13.0.dist-info/METADATA +351 -0
  171. python_pptx2-2.13.0.dist-info/RECORD +175 -0
  172. python_pptx2-2.13.0.dist-info/WHEEL +5 -0
  173. python_pptx2-2.13.0.dist-info/entry_points.txt +3 -0
  174. python_pptx2-2.13.0.dist-info/licenses/LICENSE +22 -0
  175. python_pptx2-2.13.0.dist-info/top_level.txt +1 -0
pptx2/enum/dml.py ADDED
@@ -0,0 +1,740 @@
1
+ """Enumerations used by DrawingML objects."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from pptx2.enum.base import BaseEnum, BaseXmlEnum
6
+
7
+
8
+ class MSO_COLOR_TYPE(BaseEnum):
9
+ """
10
+ Specifies the color specification scheme
11
+
12
+ Example::
13
+
14
+ from pptx2.enum.dml import MSO_COLOR_TYPE
15
+
16
+ assert shape.fill.fore_color.type == MSO_COLOR_TYPE.SCHEME
17
+
18
+ MS API Name: "MsoColorType"
19
+
20
+ http://msdn.microsoft.com/en-us/library/office/ff864912(v=office.15).aspx
21
+ """
22
+
23
+ RGB = (1, "Color is specified by an |RGBColor| value.")
24
+ """Color is specified by an |RGBColor| value."""
25
+
26
+ SCHEME = (2, "Color is one of the preset theme colors")
27
+ """Color is one of the preset theme colors"""
28
+
29
+ HSL = (101, "Color is specified using Hue, Saturation, and Luminosity values")
30
+ """Color is specified using Hue, Saturation, and Luminosity values"""
31
+
32
+ PRESET = (102, "Color is specified using a named built-in color")
33
+ """Color is specified using a named built-in color"""
34
+
35
+ SCRGB = (103, "Color is an scRGB color, a wide color gamut RGB color space")
36
+ """Color is an scRGB color, a wide color gamut RGB color space"""
37
+
38
+ SYSTEM = (
39
+ 104,
40
+ "Color is one specified by the operating system, such as the window background color.",
41
+ )
42
+ """Color is one specified by the operating system, such as the window background color."""
43
+
44
+
45
+ class MSO_FILL_TYPE(BaseEnum):
46
+ """
47
+ Specifies the type of bitmap used for the fill of a shape.
48
+
49
+ Alias: ``MSO_FILL``
50
+
51
+ Example::
52
+
53
+ from pptx2.enum.dml import MSO_FILL
54
+
55
+ assert shape.fill.type == MSO_FILL.SOLID
56
+
57
+ MS API Name: `MsoFillType`
58
+
59
+ http://msdn.microsoft.com/EN-US/library/office/ff861408.aspx
60
+ """
61
+
62
+ BACKGROUND = (
63
+ 5,
64
+ "The shape is transparent, such that whatever is behind the shape shows through."
65
+ " Often this is the slide background, but if a visible shape is behind, that will"
66
+ " show through.",
67
+ )
68
+ """The shape is transparent, such that whatever is behind the shape shows through.
69
+
70
+ Often this is the slide background, but if a visible shape is behind, that will show through.
71
+ """
72
+
73
+ GRADIENT = (3, "Shape is filled with a gradient")
74
+ """Shape is filled with a gradient"""
75
+
76
+ GROUP = (101, "Shape is part of a group and should inherit the fill properties of the group.")
77
+ """Shape is part of a group and should inherit the fill properties of the group."""
78
+
79
+ PATTERNED = (2, "Shape is filled with a pattern")
80
+ """Shape is filled with a pattern"""
81
+
82
+ PICTURE = (6, "Shape is filled with a bitmapped image")
83
+ """Shape is filled with a bitmapped image"""
84
+
85
+ SOLID = (1, "Shape is filled with a solid color")
86
+ """Shape is filled with a solid color"""
87
+
88
+ TEXTURED = (4, "Shape is filled with a texture")
89
+ """Shape is filled with a texture"""
90
+
91
+
92
+ MSO_FILL = MSO_FILL_TYPE
93
+
94
+
95
+ class MSO_LINE_DASH_STYLE(BaseXmlEnum):
96
+ """Specifies the dash style for a line.
97
+
98
+ Alias: ``MSO_LINE``
99
+
100
+ Example::
101
+
102
+ from pptx2.enum.dml import MSO_LINE
103
+
104
+ shape.line.dash_style = MSO_LINE.DASH_DOT_DOT
105
+
106
+ MS API name: `MsoLineDashStyle`
107
+
108
+ https://learn.microsoft.com/en-us/office/vba/api/Office.MsoLineDashStyle
109
+ """
110
+
111
+ DASH = (4, "dash", "Line consists of dashes only.")
112
+ """Line consists of dashes only."""
113
+
114
+ DASH_DOT = (5, "dashDot", "Line is a dash-dot pattern.")
115
+ """Line is a dash-dot pattern."""
116
+
117
+ DASH_DOT_DOT = (6, "lgDashDotDot", "Line is a dash-dot-dot pattern.")
118
+ """Line is a dash-dot-dot pattern."""
119
+
120
+ LONG_DASH = (7, "lgDash", "Line consists of long dashes.")
121
+ """Line consists of long dashes."""
122
+
123
+ LONG_DASH_DOT = (8, "lgDashDot", "Line is a long dash-dot pattern.")
124
+ """Line is a long dash-dot pattern."""
125
+
126
+ ROUND_DOT = (3, "sysDot", "Line is made up of round dots.")
127
+ """Line is made up of round dots."""
128
+
129
+ SOLID = (1, "solid", "Line is solid.")
130
+ """Line is solid."""
131
+
132
+ SQUARE_DOT = (2, "sysDash", "Line is made up of square dots.")
133
+ """Line is made up of square dots."""
134
+
135
+ DASH_STYLE_MIXED = (-2, "", "Not supported.")
136
+ """Return value only, indicating more than one dash style applies."""
137
+
138
+
139
+ MSO_LINE = MSO_LINE_DASH_STYLE
140
+
141
+
142
+ class MSO_LINE_CAP_STYLE(BaseXmlEnum):
143
+ """Specifies the end-cap style for a line.
144
+
145
+ Alias: ``MSO_LINE_CAP``
146
+
147
+ Example::
148
+
149
+ from pptx2.enum.dml import MSO_LINE_CAP
150
+
151
+ shape.line.cap = MSO_LINE_CAP.ROUND
152
+
153
+ Maps to the `cap` attribute on `<a:ln>`.
154
+ """
155
+
156
+ FLAT = (3, "flat", "Flat end cap (no extension beyond the line end).")
157
+ """Flat end cap (no extension beyond the line end)."""
158
+
159
+ ROUND = (1, "rnd", "Rounded end cap.")
160
+ """Rounded end cap."""
161
+
162
+ SQUARE = (2, "sq", "Square end cap (extends past the line end).")
163
+ """Square end cap (extends past the line end)."""
164
+
165
+
166
+ MSO_LINE_CAP = MSO_LINE_CAP_STYLE
167
+
168
+
169
+ class MSO_LINE_COMPOUND_STYLE(BaseXmlEnum):
170
+ """Specifies the compound (multi-stroke) style for a line.
171
+
172
+ Alias: ``MSO_LINE_COMPOUND``
173
+
174
+ Example::
175
+
176
+ from pptx2.enum.dml import MSO_LINE_COMPOUND
177
+
178
+ shape.line.compound = MSO_LINE_COMPOUND.DOUBLE
179
+
180
+ Maps to the `cmpd` attribute on `<a:ln>`.
181
+ """
182
+
183
+ SINGLE = (1, "sng", "Single line.")
184
+ """Single line."""
185
+
186
+ THICK_THIN = (2, "thickThin", "Thick line followed by thin.")
187
+ """Thick line followed by thin."""
188
+
189
+ THIN_THICK = (3, "thinThick", "Thin line followed by thick.")
190
+ """Thin line followed by thick."""
191
+
192
+ DOUBLE = (4, "dbl", "Two parallel lines of equal width.")
193
+ """Two parallel lines of equal width."""
194
+
195
+ TRIPLE = (5, "tri", "Three parallel lines (thin-thick-thin).")
196
+ """Three parallel lines (thin-thick-thin)."""
197
+
198
+
199
+ MSO_LINE_COMPOUND = MSO_LINE_COMPOUND_STYLE
200
+
201
+
202
+ class MSO_LINE_JOIN_STYLE(BaseEnum):
203
+ """Specifies the join style at corners of a stroked line.
204
+
205
+ Alias: ``MSO_LINE_JOIN``
206
+
207
+ Example::
208
+
209
+ from pptx2.enum.dml import MSO_LINE_JOIN
210
+
211
+ shape.line.join = MSO_LINE_JOIN.ROUND
212
+
213
+ Each member corresponds to a child element of `<a:ln>`: `<a:round/>`,
214
+ `<a:bevel/>`, or `<a:miter/>`.
215
+ """
216
+
217
+ ROUND = (1, "Round join — corresponds to `<a:round/>`.")
218
+ """Round join — corresponds to `<a:round/>`."""
219
+
220
+ BEVEL = (2, "Bevel join — corresponds to `<a:bevel/>`.")
221
+ """Bevel join — corresponds to `<a:bevel/>`."""
222
+
223
+ MITER = (3, "Miter join — corresponds to `<a:miter/>`.")
224
+ """Miter join — corresponds to `<a:miter/>`."""
225
+
226
+
227
+ MSO_LINE_JOIN = MSO_LINE_JOIN_STYLE
228
+
229
+
230
+ class MSO_LINE_END_TYPE(BaseXmlEnum):
231
+ """Specifies the arrowhead style at one end of a line.
232
+
233
+ Example::
234
+
235
+ from pptx2.enum.dml import MSO_LINE_END_TYPE
236
+
237
+ shape.line.head_end.type = MSO_LINE_END_TYPE.ARROW
238
+
239
+ Maps to the `type` attribute on `<a:headEnd>` / `<a:tailEnd>`.
240
+ """
241
+
242
+ NONE = (1, "none", "No arrowhead.")
243
+ """No arrowhead."""
244
+
245
+ ARROW = (2, "arrow", "Open arrowhead.")
246
+ """Open arrowhead."""
247
+
248
+ DIAMOND = (3, "diamond", "Diamond-shaped end.")
249
+ """Diamond-shaped end."""
250
+
251
+ OVAL = (4, "oval", "Oval (filled circle) end.")
252
+ """Oval (filled circle) end."""
253
+
254
+ STEALTH = (5, "stealth", "Stealth (concave) arrowhead.")
255
+ """Stealth (concave) arrowhead."""
256
+
257
+ TRIANGLE = (6, "triangle", "Filled triangular arrowhead.")
258
+ """Filled triangular arrowhead."""
259
+
260
+
261
+ class MSO_LINE_END_SIZE(BaseXmlEnum):
262
+ """Specifies the relative size of an arrowhead's width or length.
263
+
264
+ Used by both `head_end.width` / `head_end.length` and the corresponding
265
+ `tail_end` properties. Maps to the `w` and `len` attributes on
266
+ `<a:headEnd>` / `<a:tailEnd>`.
267
+ """
268
+
269
+ SMALL = (1, "sm", "Small arrowhead width or length.")
270
+ """Small arrowhead width or length."""
271
+
272
+ MEDIUM = (2, "med", "Medium arrowhead width or length.")
273
+ """Medium arrowhead width or length."""
274
+
275
+ LARGE = (3, "lg", "Large arrowhead width or length.")
276
+ """Large arrowhead width or length."""
277
+
278
+
279
+ class MSO_PATTERN_TYPE(BaseXmlEnum):
280
+ """Specifies the fill pattern used in a shape.
281
+
282
+ Alias: ``MSO_PATTERN``
283
+
284
+ Example::
285
+
286
+ from pptx2.enum.dml import MSO_PATTERN
287
+
288
+ fill = shape.fill
289
+ fill.patterned()
290
+ fill.pattern = MSO_PATTERN.WAVE
291
+
292
+ MS API Name: `MsoPatternType`
293
+
294
+ https://learn.microsoft.com/en-us/office/vba/api/Office.MsoPatternType
295
+ """
296
+
297
+ __deprecated_aliases__ = {"ERCENT_40": "PERCENT_40"}
298
+
299
+ CROSS = (51, "cross", "Cross")
300
+ """Cross"""
301
+
302
+ DARK_DOWNWARD_DIAGONAL = (15, "dkDnDiag", "Dark Downward Diagonal")
303
+ """Dark Downward Diagonal"""
304
+
305
+ DARK_HORIZONTAL = (13, "dkHorz", "Dark Horizontal")
306
+ """Dark Horizontal"""
307
+
308
+ DARK_UPWARD_DIAGONAL = (16, "dkUpDiag", "Dark Upward Diagonal")
309
+ """Dark Upward Diagonal"""
310
+
311
+ DARK_VERTICAL = (14, "dkVert", "Dark Vertical")
312
+ """Dark Vertical"""
313
+
314
+ DASHED_DOWNWARD_DIAGONAL = (28, "dashDnDiag", "Dashed Downward Diagonal")
315
+ """Dashed Downward Diagonal"""
316
+
317
+ DASHED_HORIZONTAL = (32, "dashHorz", "Dashed Horizontal")
318
+ """Dashed Horizontal"""
319
+
320
+ DASHED_UPWARD_DIAGONAL = (27, "dashUpDiag", "Dashed Upward Diagonal")
321
+ """Dashed Upward Diagonal"""
322
+
323
+ DASHED_VERTICAL = (31, "dashVert", "Dashed Vertical")
324
+ """Dashed Vertical"""
325
+
326
+ DIAGONAL_BRICK = (40, "diagBrick", "Diagonal Brick")
327
+ """Diagonal Brick"""
328
+
329
+ DIAGONAL_CROSS = (54, "diagCross", "Diagonal Cross")
330
+ """Diagonal Cross"""
331
+
332
+ DIVOT = (46, "divot", "Pattern Divot")
333
+ """Pattern Divot"""
334
+
335
+ DOTTED_DIAMOND = (24, "dotDmnd", "Dotted Diamond")
336
+ """Dotted Diamond"""
337
+
338
+ DOTTED_GRID = (45, "dotGrid", "Dotted Grid")
339
+ """Dotted Grid"""
340
+
341
+ DOWNWARD_DIAGONAL = (52, "dnDiag", "Downward Diagonal")
342
+ """Downward Diagonal"""
343
+
344
+ HORIZONTAL = (49, "horz", "Horizontal")
345
+ """Horizontal"""
346
+
347
+ HORIZONTAL_BRICK = (35, "horzBrick", "Horizontal Brick")
348
+ """Horizontal Brick"""
349
+
350
+ LARGE_CHECKER_BOARD = (36, "lgCheck", "Large Checker Board")
351
+ """Large Checker Board"""
352
+
353
+ LARGE_CONFETTI = (33, "lgConfetti", "Large Confetti")
354
+ """Large Confetti"""
355
+
356
+ LARGE_GRID = (34, "lgGrid", "Large Grid")
357
+ """Large Grid"""
358
+
359
+ LIGHT_DOWNWARD_DIAGONAL = (21, "ltDnDiag", "Light Downward Diagonal")
360
+ """Light Downward Diagonal"""
361
+
362
+ LIGHT_HORIZONTAL = (19, "ltHorz", "Light Horizontal")
363
+ """Light Horizontal"""
364
+
365
+ LIGHT_UPWARD_DIAGONAL = (22, "ltUpDiag", "Light Upward Diagonal")
366
+ """Light Upward Diagonal"""
367
+
368
+ LIGHT_VERTICAL = (20, "ltVert", "Light Vertical")
369
+ """Light Vertical"""
370
+
371
+ NARROW_HORIZONTAL = (30, "narHorz", "Narrow Horizontal")
372
+ """Narrow Horizontal"""
373
+
374
+ NARROW_VERTICAL = (29, "narVert", "Narrow Vertical")
375
+ """Narrow Vertical"""
376
+
377
+ OUTLINED_DIAMOND = (41, "openDmnd", "Outlined Diamond")
378
+ """Outlined Diamond"""
379
+
380
+ PERCENT_10 = (2, "pct10", "10% of the foreground color.")
381
+ """10% of the foreground color."""
382
+
383
+ PERCENT_20 = (3, "pct20", "20% of the foreground color.")
384
+ """20% of the foreground color."""
385
+
386
+ PERCENT_25 = (4, "pct25", "25% of the foreground color.")
387
+ """25% of the foreground color."""
388
+
389
+ PERCENT_30 = (5, "pct30", "30% of the foreground color.")
390
+ """30% of the foreground color."""
391
+
392
+ PERCENT_40 = (6, "pct40", "40% of the foreground color.")
393
+ """40% of the foreground color."""
394
+
395
+ ERCENT_40 = (6, "pct40", "40% of the foreground color.")
396
+ """Deprecated alias for :attr:`PERCENT_40` (preserved for back-compat)."""
397
+
398
+ PERCENT_5 = (1, "pct5", "5% of the foreground color.")
399
+ """5% of the foreground color."""
400
+
401
+ PERCENT_50 = (7, "pct50", "50% of the foreground color.")
402
+ """50% of the foreground color."""
403
+
404
+ PERCENT_60 = (8, "pct60", "60% of the foreground color.")
405
+ """60% of the foreground color."""
406
+
407
+ PERCENT_70 = (9, "pct70", "70% of the foreground color.")
408
+ """70% of the foreground color."""
409
+
410
+ PERCENT_75 = (10, "pct75", "75% of the foreground color.")
411
+ """75% of the foreground color."""
412
+
413
+ PERCENT_80 = (11, "pct80", "80% of the foreground color.")
414
+ """80% of the foreground color."""
415
+
416
+ PERCENT_90 = (12, "pct90", "90% of the foreground color.")
417
+ """90% of the foreground color."""
418
+
419
+ PLAID = (42, "plaid", "Plaid")
420
+ """Plaid"""
421
+
422
+ SHINGLE = (47, "shingle", "Shingle")
423
+ """Shingle"""
424
+
425
+ SMALL_CHECKER_BOARD = (17, "smCheck", "Small Checker Board")
426
+ """Small Checker Board"""
427
+
428
+ SMALL_CONFETTI = (37, "smConfetti", "Small Confetti")
429
+ """Small Confetti"""
430
+
431
+ SMALL_GRID = (23, "smGrid", "Small Grid")
432
+ """Small Grid"""
433
+
434
+ SOLID_DIAMOND = (39, "solidDmnd", "Solid Diamond")
435
+ """Solid Diamond"""
436
+
437
+ SPHERE = (43, "sphere", "Sphere")
438
+ """Sphere"""
439
+
440
+ TRELLIS = (18, "trellis", "Trellis")
441
+ """Trellis"""
442
+
443
+ UPWARD_DIAGONAL = (53, "upDiag", "Upward Diagonal")
444
+ """Upward Diagonal"""
445
+
446
+ VERTICAL = (50, "vert", "Vertical")
447
+ """Vertical"""
448
+
449
+ WAVE = (48, "wave", "Wave")
450
+ """Wave"""
451
+
452
+ WEAVE = (44, "weave", "Weave")
453
+ """Weave"""
454
+
455
+ WIDE_DOWNWARD_DIAGONAL = (25, "wdDnDiag", "Wide Downward Diagonal")
456
+ """Wide Downward Diagonal"""
457
+
458
+ WIDE_UPWARD_DIAGONAL = (26, "wdUpDiag", "Wide Upward Diagonal")
459
+ """Wide Upward Diagonal"""
460
+
461
+ ZIG_ZAG = (38, "zigZag", "Zig Zag")
462
+ """Zig Zag"""
463
+
464
+ MIXED = (-2, "", "Mixed pattern (read-only).")
465
+ """Mixed pattern (read-only)."""
466
+
467
+
468
+ MSO_PATTERN = MSO_PATTERN_TYPE
469
+
470
+
471
+ class MSO_THEME_COLOR_INDEX(BaseXmlEnum):
472
+ """An Office theme color, one of those shown in the color gallery on the formatting ribbon.
473
+
474
+ Alias: ``MSO_THEME_COLOR``
475
+
476
+ Example::
477
+
478
+ from pptx2.enum.dml import MSO_THEME_COLOR
479
+
480
+ shape.fill.solid()
481
+ shape.fill.fore_color.theme_color = MSO_THEME_COLOR.ACCENT_1
482
+
483
+ MS API Name: `MsoThemeColorIndex`
484
+
485
+ http://msdn.microsoft.com/en-us/library/office/ff860782(v=office.15).aspx
486
+ """
487
+
488
+ NOT_THEME_COLOR = (0, "", "Indicates the color is not a theme color.")
489
+ """Indicates the color is not a theme color."""
490
+
491
+ ACCENT_1 = (5, "accent1", "Specifies the Accent 1 theme color.")
492
+ """Specifies the Accent 1 theme color."""
493
+
494
+ ACCENT_2 = (6, "accent2", "Specifies the Accent 2 theme color.")
495
+ """Specifies the Accent 2 theme color."""
496
+
497
+ ACCENT_3 = (7, "accent3", "Specifies the Accent 3 theme color.")
498
+ """Specifies the Accent 3 theme color."""
499
+
500
+ ACCENT_4 = (8, "accent4", "Specifies the Accent 4 theme color.")
501
+ """Specifies the Accent 4 theme color."""
502
+
503
+ ACCENT_5 = (9, "accent5", "Specifies the Accent 5 theme color.")
504
+ """Specifies the Accent 5 theme color."""
505
+
506
+ ACCENT_6 = (10, "accent6", "Specifies the Accent 6 theme color.")
507
+ """Specifies the Accent 6 theme color."""
508
+
509
+ BACKGROUND_1 = (14, "bg1", "Specifies the Background 1 theme color.")
510
+ """Specifies the Background 1 theme color."""
511
+
512
+ BACKGROUND_2 = (16, "bg2", "Specifies the Background 2 theme color.")
513
+ """Specifies the Background 2 theme color."""
514
+
515
+ DARK_1 = (1, "dk1", "Specifies the Dark 1 theme color.")
516
+ """Specifies the Dark 1 theme color."""
517
+
518
+ DARK_2 = (3, "dk2", "Specifies the Dark 2 theme color.")
519
+ """Specifies the Dark 2 theme color."""
520
+
521
+ FOLLOWED_HYPERLINK = (12, "folHlink", "Specifies the theme color for a clicked hyperlink.")
522
+ """Specifies the theme color for a clicked hyperlink."""
523
+
524
+ HYPERLINK = (11, "hlink", "Specifies the theme color for a hyperlink.")
525
+ """Specifies the theme color for a hyperlink."""
526
+
527
+ LIGHT_1 = (2, "lt1", "Specifies the Light 1 theme color.")
528
+ """Specifies the Light 1 theme color."""
529
+
530
+ LIGHT_2 = (4, "lt2", "Specifies the Light 2 theme color.")
531
+ """Specifies the Light 2 theme color."""
532
+
533
+ TEXT_1 = (13, "tx1", "Specifies the Text 1 theme color.")
534
+ """Specifies the Text 1 theme color."""
535
+
536
+ TEXT_2 = (15, "tx2", "Specifies the Text 2 theme color.")
537
+ """Specifies the Text 2 theme color."""
538
+
539
+ MIXED = (
540
+ -2,
541
+ "",
542
+ "Indicates multiple theme colors are used, such as in a group shape (read-only).",
543
+ )
544
+ """Indicates multiple theme colors are used, such as in a group shape (read-only)."""
545
+
546
+
547
+ MSO_THEME_COLOR = MSO_THEME_COLOR_INDEX
548
+
549
+
550
+ class BevelPreset(BaseXmlEnum):
551
+ """Preset bevel style for the top or bottom face of a 3-D shape.
552
+
553
+ Used with ``shape.three_d.bevel_top`` and ``shape.three_d.bevel_bottom``.
554
+
555
+ Maps to the ``prst`` attribute on ``<a:bevelT>`` / ``<a:bevelB>``.
556
+ """
557
+
558
+ ANGLE = (1, "angle", "Angle bevel.")
559
+ """Angle bevel."""
560
+
561
+ ART_DECO = (2, "artDeco", "Art Deco bevel.")
562
+ """Art Deco bevel."""
563
+
564
+ CIRCLE = (3, "circle", "Circle bevel.")
565
+ """Circle bevel."""
566
+
567
+ CONVEX = (4, "convex", "Convex bevel.")
568
+ """Convex bevel."""
569
+
570
+ COOL_SLANT = (5, "coolSlant", "Cool slant bevel.")
571
+ """Cool slant bevel."""
572
+
573
+ CROSS = (6, "cross", "Cross bevel.")
574
+ """Cross bevel."""
575
+
576
+ DIVOT = (7, "divot", "Divot bevel.")
577
+ """Divot bevel."""
578
+
579
+ HARD_EDGE = (8, "hardEdge", "Hard edge bevel.")
580
+ """Hard edge bevel."""
581
+
582
+ NONE = (9, "none", "No bevel.")
583
+ """No bevel."""
584
+
585
+ RELAXED_INSET = (10, "relaxedInset", "Relaxed inset bevel.")
586
+ """Relaxed inset bevel."""
587
+
588
+ RIBLET = (11, "riblet", "Riblet bevel.")
589
+ """Riblet bevel."""
590
+
591
+ SLOPE = (12, "slope", "Slope bevel.")
592
+ """Slope bevel."""
593
+
594
+ SOFT_ROUND = (13, "softRound", "Soft round bevel.")
595
+ """Soft round bevel."""
596
+
597
+
598
+ class PresetMaterial(BaseXmlEnum):
599
+ """Preset 3-D surface material for a shape.
600
+
601
+ Used with ``shape.three_d.preset_material``.
602
+
603
+ Maps to the ``prstMaterial`` attribute on ``<a:sp3d>``.
604
+ """
605
+
606
+ # Read-only alias: python-pptx2 <= 2.8.0 emitted the camelCase "softMetal"
607
+ # (invalid per ISO ST_PresetMaterialType). Accept it on read so decks
608
+ # written by those versions still load; writing always uses "softmetal".
609
+ __xml_read_aliases__ = {"softMetal": "softmetal"}
610
+
611
+ CLEAR = (1, "clear", "Clear (transparent) material.")
612
+ """Clear (transparent) material."""
613
+
614
+ DK_EDGE = (2, "dkEdge", "Dark-edge material.")
615
+ """Dark-edge material."""
616
+
617
+ FLAT = (3, "flat", "Flat (non-reflective) material.")
618
+ """Flat (non-reflective) material."""
619
+
620
+ LEGACY_MATTE = (4, "legacyMatte", "Legacy matte material.")
621
+ """Legacy matte material."""
622
+
623
+ LEGACY_METAL = (5, "legacyMetal", "Legacy metal material.")
624
+ """Legacy metal material."""
625
+
626
+ LEGACY_PLASTIC = (6, "legacyPlastic", "Legacy plastic material.")
627
+ """Legacy plastic material."""
628
+
629
+ LEGACY_WIREFRAME = (7, "legacyWireframe", "Legacy wireframe material.")
630
+ """Legacy wireframe material."""
631
+
632
+ MATTE = (8, "matte", "Matte material.")
633
+ """Matte material."""
634
+
635
+ METAL = (9, "metal", "Metal material.")
636
+ """Metal material."""
637
+
638
+ NONE = (10, "none", "No explicit material (leaves prstMaterial unset).")
639
+ """No explicit material.
640
+
641
+ Assigning this to ``shape.three_d.preset_material`` *clears* the material
642
+ (leaves ``prstMaterial`` unset) rather than emitting the token ``"none"``,
643
+ which is invalid per ISO ``ST_PresetMaterialType`` and would make
644
+ PowerPoint report the file as broken. For an explicit flat surface use
645
+ :attr:`FLAT`.
646
+ """
647
+
648
+ PLASTIC = (11, "plastic", "Plastic material.")
649
+ """Plastic material."""
650
+
651
+ POWDER = (12, "powder", "Powder material.")
652
+ """Powder material."""
653
+
654
+ SOFT_EDGE = (13, "softEdge", "Soft-edge material.")
655
+ """Soft-edge material."""
656
+
657
+ SOFT_METAL = (14, "softmetal", "Soft-metal material.")
658
+ """Soft-metal material.
659
+
660
+ The ISO/IEC 29500 ``ST_PresetMaterialType`` enumeration spells this value
661
+ all-lowercase (``softmetal``); every other material is camelCase. Emitting
662
+ ``softMetal`` fails schema validation and PowerPoint repairs the file.
663
+ """
664
+
665
+ TRANSLUCENT_POWDER = (15, "translucentPowder", "Translucent powder material.")
666
+ """Translucent powder material."""
667
+
668
+ WARM_MATTE = (16, "warmMatte", "Warm matte material.")
669
+ """Warm matte material."""
670
+
671
+
672
+ class MSO_PRESET_SHADOW(BaseXmlEnum):
673
+ """Preset-shadow style for a shape.
674
+
675
+ Used with ``shape.preset_shadow.preset``. Maps to the (schema-required)
676
+ ``prst`` attribute on ``<a:prstShdw>``, whose ISO/IEC 29500
677
+ ``ST_PresetShadowVal`` enumeration spans the twenty values ``shdw1`` ..
678
+ ``shdw20``. The bare strings ``"shdw1"`` .. ``"shdw20"`` are also accepted
679
+ by ``preset_shadow.preset`` for convenience.
680
+ """
681
+
682
+ SHADOW_1 = (1, "shdw1", "Preset shadow 1 (top-left offset).")
683
+ """Preset shadow 1."""
684
+
685
+ SHADOW_2 = (2, "shdw2", "Preset shadow 2.")
686
+ """Preset shadow 2."""
687
+
688
+ SHADOW_3 = (3, "shdw3", "Preset shadow 3.")
689
+ """Preset shadow 3."""
690
+
691
+ SHADOW_4 = (4, "shdw4", "Preset shadow 4.")
692
+ """Preset shadow 4."""
693
+
694
+ SHADOW_5 = (5, "shdw5", "Preset shadow 5.")
695
+ """Preset shadow 5."""
696
+
697
+ SHADOW_6 = (6, "shdw6", "Preset shadow 6.")
698
+ """Preset shadow 6."""
699
+
700
+ SHADOW_7 = (7, "shdw7", "Preset shadow 7.")
701
+ """Preset shadow 7."""
702
+
703
+ SHADOW_8 = (8, "shdw8", "Preset shadow 8.")
704
+ """Preset shadow 8."""
705
+
706
+ SHADOW_9 = (9, "shdw9", "Preset shadow 9.")
707
+ """Preset shadow 9."""
708
+
709
+ SHADOW_10 = (10, "shdw10", "Preset shadow 10.")
710
+ """Preset shadow 10."""
711
+
712
+ SHADOW_11 = (11, "shdw11", "Preset shadow 11.")
713
+ """Preset shadow 11."""
714
+
715
+ SHADOW_12 = (12, "shdw12", "Preset shadow 12.")
716
+ """Preset shadow 12."""
717
+
718
+ SHADOW_13 = (13, "shdw13", "Preset shadow 13.")
719
+ """Preset shadow 13."""
720
+
721
+ SHADOW_14 = (14, "shdw14", "Preset shadow 14.")
722
+ """Preset shadow 14."""
723
+
724
+ SHADOW_15 = (15, "shdw15", "Preset shadow 15.")
725
+ """Preset shadow 15."""
726
+
727
+ SHADOW_16 = (16, "shdw16", "Preset shadow 16.")
728
+ """Preset shadow 16."""
729
+
730
+ SHADOW_17 = (17, "shdw17", "Preset shadow 17.")
731
+ """Preset shadow 17."""
732
+
733
+ SHADOW_18 = (18, "shdw18", "Preset shadow 18.")
734
+ """Preset shadow 18."""
735
+
736
+ SHADOW_19 = (19, "shdw19", "Preset shadow 19.")
737
+ """Preset shadow 19."""
738
+
739
+ SHADOW_20 = (20, "shdw20", "Preset shadow 20 (bottom-right offset).")
740
+ """Preset shadow 20."""