playing around making playing cards in codea. wanted to try doing that with just rotate, text, rect and ellipse (so no meshes or images). I don’t get how to use rotate though…
Card = class()
function Card:init(x, y, value)
self.x = x
self.y = y
self.w = 100
self.h = 160
self.value = value
end
function Card:draw()
pushStyle()
fill(50,50,50)
rect(self.x, self.y, self.w, self.h)
fontSize(32)
fill(255, 0, 52, 255)
text(self.value, self.x + 30, self.y + 150)
pushMatrix()
rotate(180,self.x+50,self.y+80,0)
text(self.value, self.x + 30, self.y + 150)
popMatrix()
popStyle()
end
Im trying to rotate the text. I’m really not sure what i should set x,y to, but the gist is that the rectangle is a card and the text is the value of the card and it should be mirrored on the other side of it.