package documentation
Undocumented
From __init__.py
:
Function | mm |
Converts millimetres to pixel. |
Function | msize |
Converts a rectangle description of any unit to millimetres. |
Function | msize |
Converts a rectangle description of any unit to pixels. |
Function | parse |
Parse a measurement in the string or numeric form. |
Function | parse |
Converts weeks, days, hours or minutes to seconds. |
Function | px |
Converts pixel to millimetres. |
Function | res |
Converts the user's resolution to the scale. |
Function | scale |
Converts the scale to the user's resolution. |
Function | size |
Converts a rectangle description in millimetres to pixels. |
Function | size |
Converts a rectangle description in pixel to millimetres. |
Function | to |
Converts a measurement of any unit to millimetres. |
Function | to |
Converts a measurement to amount of pixels. |
Function | to |
Converts a to a string. |
Constant | DEFAULT |
Undocumented |
Constant | MM |
Undocumented |
Constant | OGC |
Undocumented |
Constant | OGC |
Undocumented |
Constant | PDF |
Undocumented |
Constant | PT |
Undocumented |
Variable | _durations |
Undocumented |
Variable | _number |
Undocumented |
Variable | _unit |
Undocumented |
Converts the scale to the user's resolution.
Parameters | |
x:_number | Scale. |
Returns | |
float | Resolution in pixel. |
Converts the user's resolution to the scale.
Parameters | |
x:_number | Resolution in pixel per inch. |
Returns | |
int | Scale. |
Converts millimetres to pixel.
Parameters | |
x:_number | Millimetres. |
ppi:int | Pixels per inch. |
Returns | |
float | Amount of pixels. |
Converts a measurement to amount of pixels.
Parameters | |
xu:gws.Measurement | A measurement to convert to pixels. |
ppi:int | Pixels per inch. |
Returns | |
gws.Measurement | A measurement. |
Converts pixel to millimetres.
Parameters | |
x:_number | Amount of pixels. |
ppi:int | Pixel per inch. |
Returns | |
float | Amount of millimetres. |
Converts a measurement of any unit to millimetres.
Parameters | |
xu:gws.Measurement | A measurement to convert. |
ppi:int | Pixels per inch. |
Returns | |
gws.Measurement | A measurement. |
Converts a to a string.
Parameters | |
xu:gws.Measurement | A measurement to convert. |
Returns | |
str | The input tuple as a string, like '5mm'. |
Parse a measurement in the string or numeric form.
Parameters | |
s:str|int|float | A measurement to parse. |
defaultgws.Uom | Default unit. |
Returns | |
gws.Measurement | A measurement. |
Raises | |
ValueError | if the unit is missing, if the formatting is wrong or if the unit is invalid. |