MCPcopy Index your code
hub / github.com/clips/pattern / translate_matrix

Function translate_matrix

pattern/web/pdf/utils.py:19–21  ·  view source on GitHub ↗

Translates a matrix by (x,y).

((a,b,c,d,e,f), (x,y))

Source from the content-addressed store, hash-verified

17 a0*e1+c0*f1+e0, b0*e1+d0*f1+f0)
18
19def translate_matrix((a,b,c,d,e,f), (x,y)):
20 """Translates a matrix by (x,y)."""
21 return (a,b,c,d,x*a+y*c+e,x*b+y*d+f)
22
23def apply_matrix_pt((a,b,c,d,e,f), (x,y)):
24 """Applies a matrix to a point."""

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…