Hello everyone!
I'm having a issue when trying to draw text with right Alignment
What I expect is to write my text in the top-right corner by using the x=400 y=10 coordinates on a fullscreen image.
Here there are some examples (the blue line is the reference from where the background image starts (I'm drawing the text over another image).
This is what I expect:
This is what I'm getting:
local back = self.imgtable:getImage(3)
gfx.lockFocus(back)
gfx.setFont(self.font)
gfx.drawTextAligned("123456789", 30, 0, kTextAlignment.right)
gfx.unlockFocus()
self:setImage(back)
This is what happens when I use kTextAlignment.left
(instead of right. It works properly but it is not what I need)
local back = self.imgtable:getImage(3)
gfx.lockFocus(back)
gfx.setFont(self.font)
gfx.drawTextAligned("123456789", 30, 0, kTextAlignment.left)
gfx.unlockFocus()
self:setImage(back)
Platform:
I'm devloping with Lua SDK 1.12.2 for Windows.