Answers the point as string of units. Ignores the `z`-value if it renders to 0. >>> point2S(pt(22.4, 33.5, 44.6)) '22.4pt 33.5pt 44.6pt' >>> point2S(pt(33.6, 44.7)) '33.6pt 44.7pt'
(p)
| 127 | return point[0] + offset[0], point[1] + offset[1], point[2] + offset[2] |
| 128 | |
| 129 | def point2S(p): |
| 130 | """Answers the point as string of units. Ignores the `z`-value if it |
| 131 | renders to 0. |
| 132 | |
| 133 | >>> point2S(pt(22.4, 33.5, 44.6)) |
| 134 | '22.4pt 33.5pt 44.6pt' |
| 135 | >>> point2S(pt(33.6, 44.7)) |
| 136 | '33.6pt 44.7pt' |
| 137 | """ |
| 138 | x, y, z = point3D(p) |
| 139 | if z.rv: |
| 140 | return '%s %s %s' % (x, y, z) |
| 141 | return '%s %s' % (x, y) |
| 142 | |
| 143 | def point2roundedS(p): |
| 144 | """Answers the point as string of rounded units. Ignores the `z`-value if |