I'd write x=-t, also reference t in all other places where it is meant.
In sake of example correctness: if input image size ration exceeds 2.40:1, e.g. 3:1, i think it will draw just two horizontal lines (didn't test though).