The "magic: is TExec … look at the code
When you draw the line you give two absolute positions. So the line always connect the two positions. But when you change the canvas layout by changing margins or canvas size the line angle changes ! So if the line position would have been specified with its angle you would have seen the line moving the same way. Now have a look at the text angle value when you resize the canvas … it changes ? right ? … so it proves what I just explained … So, no, texts and lines are not treated differently that’s just simple geometry.