Altro esercizio

« Older   Newer »
  Share  
/dev/random
CAT_IMG Posted on 3/2/2011, 17:13     +1   -1




Disegna croci fatte di cerchi con distanza tra cerchi crescente.

SPOILER (click to view)
CODICE
#include <GDIPlus.au3>
#include <GUIConstantsEx.au3>

;;;;;;;;;;;;;;;
$step = 1
;;;;;;;;;;;;;;;

Opt("GUIOnEventMode", 1)

$window = GUICreate("GDI+", 500, 500)
WinSetTitle($window, "", "GDI+ | " & $step)
GUISetBkColor(0xFFFFFF)

GUISetState(@SW_SHOW, $window)
GUISetOnEvent($GUI_EVENT_CLOSE, "esci")

_GDIPlus_Startup()
$graphics = _GDIPlus_GraphicsCreateFromHWND($window)
;$pen = _GDIPlus_PenCreate(0x000000, 2)

Func Redraw()
       For $i = 1 To 368 Step $step
               _GDIPlus_GraphicsDrawEllipse($graphics, $i, $i, 130, 130);, $pen)
       Next

       $l = 1
       For $i = 368 To 1 Step -$step
               _GDIPlus_GraphicsDrawEllipse($graphics, $i, $l, 130, 130);, $pen)
               $l += $step
       Next
EndFunc

While 1
       _GDIPlus_GraphicsClear($graphics, 0xFFFFFFFF)
       WinSetTitle($window, "", "GDI+ | " & $step)
       Redraw()
       Sleep(100)
       $step += 1
WEnd

Func esci()
       _GDIPlus_GraphicsDispose($graphics)
       _GDIPlus_Shutdown()
       Exit 0
EndFunc


Edited by /dev/random - 3/2/2011, 18:34
 
Top
T3rrorisT
CAT_IMG Posted on 3/2/2011, 18:27     +1   -1




Ma che LOLLITOSO XD Cmq e' abbastanza figo :P
 
Top
1 replies since 3/2/2011, 17:13   110 views
  Share