rotozoom in hollywood

Find quick help here to get you started with Hollywood
Post Reply
User avatar
stefff285
Posts: 230
Joined: Sat Mar 03, 2012 12:59 pm
Location: dijon / france
Contact:

rotozoom in hollywood

Post 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
jalih
Posts: 281
Joined: Fri Jun 18, 2010 8:08 pm
Location: Finland

Re: rotozoom in hollywood

Post 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
User avatar
stefff285
Posts: 230
Joined: Sat Mar 03, 2012 12:59 pm
Location: dijon / france
Contact:

Re: rotozoom in hollywood

Post 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
Post Reply