Function
transformPoint
(point1, point2, scalex=None, scaley=None, translatex=None, translatey=None)
Source from the content-addressed store, hash-verified
| 116 | |
| 117 | |
| 118 | def transformPoint(point1, point2, scalex=None, scaley=None, translatex=None, translatey=None): |
| 119 | if scalex == None: |
| 120 | scalex = DEFAULT_SCALEX |
| 121 | if scaley == None: |
| 122 | scaley = DEFAULT_SCALEY |
| 123 | if translatex == None: |
| 124 | translatex = DEFAULT_TRANSLATEX |
| 125 | if translatey == None: |
| 126 | translatey = DEFAULT_TRANSLATEY |
| 127 | |
| 128 | |
| 129 | return (int(point1[0] * scalex + translatex), |
| 130 | int(point1[1] * scaley + translatey), |
| 131 | int(point2[0] * scalex + translatex), |
| 132 | int(point2[1] * scaley + translatey)) |
| 133 | |
| 134 | |
| 135 | bext.fg('random') |
Tested by
no test coverage detected