added scale, width and height params
merged from remote
sorted out some scaling and translation errors for sharp lines
fixed arrow initialisation