Layer anchor point

Report any Hollywood bugs here
Post Reply
jalih
Posts: 281
Joined: Fri Jun 18, 2010 8:08 pm
Location: Finland

Layer anchor point

Post by jalih »

Is this a bug? Anchor point of a layer moves if you use it as a output device for drawing.

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)	
Forever
This won't give too much headache as something like below gets the job done:

Code: 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
User avatar
airsoftsoftwair
Posts: 5862
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Layer anchor point

Post by airsoftsoftwair »

This looks like a bug. Thanks for reporting!
Post Reply