LilyPondDimension

digraph InheritanceGraph { graph [bgcolor=transparent, color=lightsteelblue2, fontname=Arial, fontsize=10, outputorder=edgesfirst, overlap=prism, penwidth=2, rankdir=LR, splines=spline, style="dashed, rounded", truecolor=true]; node [colorscheme=pastel19, fontname=Arial, fontsize=10, height=0, penwidth=2, shape=box, style="filled, rounded", width=0]; edge [color=lightslategrey, penwidth=1]; subgraph "cluster_abjad.lilypondfile" { graph [label="abjad.lilypondfile"]; node [color=1]; "abjad.lilypondfile.LilyPondDimension.LilyPondDimension" [URL="../api/abjad/lilypondfile/LilyPondDimension.html#abjad.lilypondfile.LilyPondDimension.LilyPondDimension", color=black, fontcolor=white, label="Lily\nPond\nDimension", target=_top]; } subgraph "cluster_abjad.system" { graph [label="abjad.system"]; node [color=2]; "abjad.system.AbjadObject.AbjadObject" [URL="../api/abjad/lilypondfile/../system/AbjadObject.html#abjad.system.AbjadObject.AbjadObject", label="Abjad\nObject", target=_top]; } subgraph cluster_builtins { graph [label=builtins]; node [color=3]; "builtins.object" [URL="https://docs.python.org/3.6/library/functions.html#object", label=object, target=_top]; } "abjad.system.AbjadObject.AbjadObject" -> "abjad.lilypondfile.LilyPondDimension.LilyPondDimension"; "builtins.object" -> "abjad.system.AbjadObject.AbjadObject"; }

class abjad.lilypondfile.LilyPondDimension.LilyPondDimension(value=0, unit='cm')

A LilyPond file \paper block dimension.

>>> abjad.LilyPondDimension(2, 'in')
LilyPondDimension(value=2, unit='in')

Use for LilyPond file \paper block attributes.


Attributes Summary

__format__ Formats LilyPond dimension.
unit Gets unit of LilyPond dimension.
value Gets value of LilyPond dimension.

Special methods

__format__(format_specification='')

Formats LilyPond dimension.

>>> dimension = abjad.LilyPondDimension(2, 'in')
>>> print(format(dimension))
2\in

Returns string.

(AbjadObject).__repr__()

Gets interpreter representation of Abjad object.

Returns string.


Read-only properties

unit

Gets unit of LilyPond dimension.

>>> dimension = abjad.LilyPondDimension(2, 'in')
>>> dimension.unit
'in'

Returns 'cm', 'in', 'mm' or 'pt'.

value

Gets value of LilyPond dimension.

>>> dimension = abjad.LilyPondDimension(2, 'in')
>>> dimension.value
2

Returns number.