MCPcopy Create free account
hub / github.com/scanny/python-pptx / line_spacing

Method line_spacing

src/pptx/oxml/text.py:513–525  ·  view source on GitHub ↗

The spacing between baselines of successive lines in this paragraph. A float value indicates a number of lines. A |Length| value indicates a fixed spacing. Value is contained in `./a:lnSpc/a:spcPts/@val` or `./a:lnSpc/a:spcPct/@val`. Value is |None| if no element is present.

(self)

Source from the content-addressed store, hash-verified

511
512 @property
513 def line_spacing(self) -> float | Length | None:
514 """The spacing between baselines of successive lines in this paragraph.
515
516 A float value indicates a number of lines. A |Length| value indicates a fixed spacing.
517 Value is contained in `./a:lnSpc/a:spcPts/@val` or `./a:lnSpc/a:spcPct/@val`. Value is
518 |None| if no element is present.
519 """
520 lnSpc = self.lnSpc
521 if lnSpc is None:
522 return None
523 if lnSpc.spcPts is not None:
524 return lnSpc.spcPts.val
525 return cast(CT_TextSpacingPercent, lnSpc.spcPct).val
526
527 @line_spacing.setter
528 def line_spacing(self, value: float | Length | None):

Callers

nothing calls this directly

Calls 2

set_spcPtsMethod · 0.80
set_spcPctMethod · 0.80

Tested by

no test coverage detected