DrawText alignment "RIGHT" does not work

D

Deleted member 103

Guest
this works:
Canvas1.DrawText("This is a nice sentence.", 200dip, 200dip, Typeface.DEFAULT_BOLD, 30, Colors.Blue, "LEFT")

that does not work
Canvas1.DrawText("This is a nice sentence.", 200dip, 200dip, Typeface.DEFAULT_BOLD, 30, Colors.Blue, "RIGHT")

Can it be?
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
The alignment here is related to the origin point.
LEFT means that the origin point is left to the text.
RIGHT means that the origin point is right to the text:

20101222_2.png


The origin point is marked with a red circle.
 
Upvote 0

colin9876

Active Member
Licensed User
Thats reminds me the example of the Drawtext which comes up in the box when you type .Drawtext is wrong. It has an extra parameter in it at the end.
It confused me for a while as I tried it with the exact fields as shown in the example which has (...,"LEFT",5) and its says too many parameters. The last number is not required.

Maybe Erel is already aware of this but just mentioning it as worth fixing the next release.
 
Upvote 0
Top