I always though if this was on the image would be drawn from the midpoint of that image, no i am guessing when i use the setscale this if then messing things up here is what i have
i am trying to get the rings to come straight forward towards viewer dead center....what am i doing wrong any ideas......
Graphics game.DeskWidth, game.DeskHeight, 0 AutoMidHandle True Global ring:TImage = CreateImage(80, 80, FILTEREDIMAGE) Cls SetColor 20, 255, 100 DrawOval 40, 40, 40, 40 SetColor 0, 0, 0 DrawOval 42, 42, 36, 36 SetColor 255, 255, 255 GrabImage(ring, 0, 0) Repeat Cls If KeyHit(KEY_Z) Then Tring.Create() Tring.update() Tring.draw() Flip Until KeyHit(KEY_ESCAPE) End Type Tring Field sc:Float, de Global ringlist:TList = New TList Function Create() r:Tring = New Tring r.sc = 0.1 ringlist.addlast r End Function Function update() For r:Tring = EachIn ringlist r.sc = r.sc * 1.05 Next End Function Function draw() Local co = 0 For r:Tring = EachIn ringlist co = co + 1 SetScale 1, 1 Local dx = game.DeskWidth / 2 Local dy = game.DeskHeight / 2 SetScale r.sc, r.sc SetAlpha 1 SetColor 255, 200, 50 DrawImage ring, dx, dy Next SetScale 1, 1 SetColor 255, 255, 255 DrawText "count of rings= " + co, 10, 60 End Function End Type Type game Global deskwidth:Int = 1024 Global deskheight:Int = 768 End Type
i am trying to get the rings to come straight forward towards viewer dead center....what am i doing wrong any ideas......