Opt("GUIOnEventMode", 1) ; Hier rumspielen! = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Local $ForeRed = 0, $ForeGreen = 0, $ForeBlue = 0 ; Farbe für den Vordergrund (das Äußere) Local $BackRed = 255, $BackGreen = 0, $BackBlue = 0 ; Hintergrund (das Innere) Local $AntiAliasing = 1 ; AA höher als 1x sollte nur bei RotRange > 100 nötig sein! Local $RotRange = 100 ; Wie stark soll es rotieren ; Rumspielen beenden! = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = $hGUI = GUICreate("PolyPlay | FPS: 0",500,500,-1,-1,Default,34078728) GUISetBkColor(0) Global $hGraphics = GUICtrlCreateGraphic(0,0) GUISetOnEvent(-3, "done") GUISetState() AdlibRegister("FPS", 1000) Local $r = -$RotRange, $modificator = 1, $iFPS = 0 While 1 $r += $modificator If $r > $RotRange Or $r < -$RotRange Then $modificator *= -1 Draw($ForeRed, $ForeGreen, $ForeBlue, $BackRed, $BackGreen, $BackBlue, $r, 100 * $AntiAliasing) $iFPS += 1 WEnd Func Draw($FRed, $FGreen, $FBlue, $BRed, $BGreen, $BBlue, $Rotate, $Step) $old = $hGraphics $hGraphics = GUICtrlCreateGraphic(0,0) Local $ROffSet=($BRed-$FRed)/$Step,$GOffset=($BGreen-$FGreen)/$Step,$BOffset=($BBlue-$FBlue)/$Step,$XOffset=250/$Step,$YOffset=250/$Step Local $RotateOffset = $Rotate / $Step Dim $T For $T = 0 To $Step $Color = RGB($FRed+($T*$ROffSet),$FGreen+($T*$GOffset),$FBlue+($T*$BOffset)) GUICtrlSetGraphic($hGraphics,8,$Color,$Color) GUICtrlSetGraphic($hGraphics,6,250+X(-(250-($T*$XOffset)),-(250-($T*$YOffset)),$RotateOffset*$T),250+Y(-(250-($T*$XOffset)),-(250-($T*$YOffset)),$RotateOffset*$T)) GUICtrlSetGraphic($hGraphics,2,250+X( (250-($T*$XOffset)),-(250-($T*$YOffset)),$RotateOffset*$T),250+Y( (250-($T*$XOffset)),-(250-($T*$YOffset)),$RotateOffset*$T)) GUICtrlSetGraphic($hGraphics,2,250+X( (250-($T*$XOffset)), (250-($T*$YOffset)),$RotateOffset*$T),250+Y( (250-($T*$XOffset)), (250-($T*$YOffset)),$RotateOffset*$T)) GUICtrlSetGraphic($hGraphics,2,250+X(-(250-($T*$XOffset)), (250-($T*$YOffset)),$RotateOffset*$T),250+Y(-(250-($T*$XOffset)), (250-($T*$YOffset)),$RotateOffset*$T)) Next GUICtrlSetGraphic($hGraphics, 22) GUICtrlDelete($old) EndFunc Func RGB($r, $g, $b) Return "0x" & Hex(Int($r), 2) & Hex(Int($g), 2) & Hex(Int($b), 2) EndFunc Func X($RX, $RY, $ZAn) $TZAn = $ZAn * (3.141592654 / 180) Return $RX * Cos($TZAn) - $RY * Sin($TZAn) EndFunc Func Y($RX, $RY, $ZAn) $TZAn = $ZAn * (3.141592654 / 180) Return $RY * Cos($TZAn) + $RX * Sin($TZAn) EndFunc Func FPS() WinSetTitle("", "", "PolyPlay | FPS: " & $iFPS) $iFPS = 0 EndFunc Func done() Exit EndFunc