Length
linnet_py Class
Length(value: float, unit: Literal['pt', 'mm', 'cm', 'in', 'em'])A Typst length such as 2pt or 1.2em.
Constructor
#Parameters
| Name | Type | Default | Description |
|---|---|---|---|
value | float | — | — |
unit | Literal['pt', 'mm', 'cm', 'in', 'em'] | — | — |
Member details
value
Property · read-onlyunit
Property · read-onlypt
Static method#
pt(value: float) -> LengthNo description is available for this member.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
value | float | — | — |
mm
Static method#
mm(value: float) -> LengthNo description is available for this member.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
value | float | — | — |
cm
Static method#
cm(value: float) -> LengthNo description is available for this member.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
value | float | — | — |
inches
Static method#
inches(value: float) -> LengthNo description is available for this member.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
value | float | — | — |
em
Static method#
em(value: float) -> LengthNo description is available for this member.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
value | float | — | — |
__repr__
MethodView generated signature source: docs/api/python/linnet-py.pyi:720