Layer anchor point
Posted: Mon Sep 06, 2010 10:43 pm
Is this a bug? Anchor point of a layer moves if you use it as a output device for drawing.
Simple example:
This won't give too much headache as something like below gets the job done:
Simple example:
Code: Select all
EnableLayers
SetFillStyle(#FILLCOLOR)
Box(#CENTER, #CENTER, 300, 200, #RED, {AnchorX = 0.5, AnchorY = 0.5, RoundLevel = 25, Hidden = False })
SelectLayer(1)
SetFont(#SANS, 50)
SetFontStyle(#ANTIALIAS)
TextOut(#CENTER, #CENTER, "Hello World!")
EndSelect
WaitLeftMouse
ang = 0
Repeat
ang = ang + 10
ang = Wrap(ang, 0, 360)
RotateLayer(1, ang)
ForeverCode: Select all
EnableLayers
SetFillStyle(#FILLCOLOR)
Box(#CENTER, #CENTER, 300, 200, #RED, {AnchorX = 0.5, AnchorY = 0.5, RoundLevel = 25, Hidden = True })
SelectLayer(1)
SetFont(#SANS, 50)
SetFontStyle(#ANTIALIAS)
TextOut(#CENTER, #CENTER, "Hello World!")
EndSelect
ShowLayer(1, #CENTER, #CENTER)
ang = 0
Repeat
ang = ang + 10
ang = Wrap(ang, 0, 360)
RotateLayer(1, ang)
Forever