Page 1 of 1
rotozoom in hollywood
Posted: Fri Mar 23, 2012 5:44 pm
by stefff285
hello all
how are you ?
i begin to have ideas how to code my first "thing" in hollywood
then i would like to make an hidden part and i would like to know
if there is someone who made a script for rotozoom ?
i mean a 256x256 in 16 color rotozoom for example in double buffer ?
thanx by advance
steff
Re: rotozoom in hollywood
Posted: Sun Mar 25, 2012 1:58 pm
by jalih
You can specify rotation and scaling parameters as an Hollywood standard tags for all drawing commands.
Simple rotozoom using layers:
Code: Select all
@DISPLAY {Width = 640, Height = 480, Title = "Simple Layer test"}
EnableLayers()
; Create layer and draw some stuff on it.
SetFillStyle(#FILLCOLOR)
Box(#CENTER, #CENTER, 300, 200, #RED, { Name = "HelloBox", AnchorX = 0.5, AnchorY = 0.5, RoundLevel = 25, Hidden = True })
SelectLayer("HelloBox")
SetFont(#SANS, 50)
SetFontColor(#WHITE)
SetFontStyle(#ANTIALIAS)
TextOut(#CENTER, #CENTER, "Hello World!")
EndSelect()
; Make it visible
ShowLayer("HelloBox", #CENTER, #CENTER)
Local ang = 0
Local dang = 1
Local scale = 1
Local dscale = 0.015
Repeat
ang = ang + dang
ang = Wrap(ang, 0, 360)
scale = scale + dscale
If scale >= 3 Or scale <= 0.5 Then dscale = -dscale
VWait()
SetLayerStyle("HelloBox", { ScaleX = scale, ScaleY = scale, Rotate = ang })
Forever
Re: rotozoom in hollywood
Posted: Sun Mar 25, 2012 2:27 pm
by stefff285
thank you so much !
whow cool i go try this right now on my aspire aros and get back
to you to thank you yet
regards from deep france
stéphane