Compute matrix which maps line from p1 to p2 to the x-axis, such that it maintains its length and p1 * matrix = Point(0, 0). Args: p1, p2: point_like Returns: Matrix which maps p1 to Point(0, 0) and p2 to a point on the x axis at the same distance to Point(0,0).
(p1: point_like, p2: point_like)
| 23364 | |
| 23365 | |
| 23366 | def planish_line(p1: point_like, p2: point_like) -> Matrix: |
| 23367 | """Compute matrix which maps line from p1 to p2 to the x-axis, such that it |
| 23368 | maintains its length and p1 * matrix = Point(0, 0). |
| 23369 | |
| 23370 | Args: |
| 23371 | p1, p2: point_like |
| 23372 | Returns: |
| 23373 | Matrix which maps p1 to Point(0, 0) and p2 to a point on the x axis at |
| 23374 | the same distance to Point(0,0). Will always combine a rotation and a |
| 23375 | transformation. |
| 23376 | """ |
| 23377 | p1 = Point(p1) |
| 23378 | p2 = Point(p2) |
| 23379 | return Matrix(util_hor_matrix(p1, p2)) |
| 23380 | |
| 23381 | |
| 23382 | class JM_image_reporter_Filter(mupdf.PdfFilterOptions2): |
no test coverage detected
searching dependent graphs…