I think we are trying to say the same thing, it's just the way you worded the question "But I'm not sure if (right aligned) text position is calculated from top left or top right corner?." You are placing the text box on an X axis that moves from left to right and a Y axis from top to bottom. And, as you know, the starting position would be 0,0. Its not really the corner of the text box per say, but more like the alignment starts on either the right or the left of the text box where it was placed. To better Illustrate this, make your text box one char in width (flw*0.01 in this scenario) - this is good for determining text placement as well. If left alignment is specified the char will be more left and vise versa for right alignment. And, using no alignment the text will extend left and right depending on the width specified.
This is one of those things where it gets easier the more you play around with it. After doing a few layouts, the coordinates become like second nature. Of course, this is my own understanding and world view of how it works.