Hier 3 kleine Beispiele (2x von mir und 1x von Eukalyptus):
Rotated Letters by Eukalyptus:
Spoiler anzeigen
#include "GDIP.au3"
#include <GDIPlus.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
_CheckGDIpWarpBug("GDIp.au3")
[/autoit] [autoit][/autoit] [autoit]Opt("GUIOnEventMode", 1)
[/autoit] [autoit][/autoit] [autoit]_GDIPlus_Startup()
[/autoit] [autoit][/autoit] [autoit]$iW = 600
$iH = 600
$hGui = GUICreate("Test", $iW, $iH)
GUISetOnEvent(-3, "_Exit")
GUISetState()
$hGraphics = _GDIPlus_GraphicsCreateFromHWND($hGui)
$hBmpBuffer = _GDIPlus_BitmapCreateFromGraphics($iW, $iH, $hGraphics)
$hGfxBuffer = _GDIPlus_ImageGetGraphicsContext($hBmpBuffer)
_GDIPlus_GraphicsSetSmoothingMode($hGfxBuffer, 2)
_GDIPlus_GraphicsClear($hGfxBuffer, 0xFF000000)
$hBrush = _GDIPlus_BrushCreateSolid(0xFFFFAA00)
$hBrushTrans = _GDIPlus_BrushCreateSolid(0x66000000)
$sText = "Rotated Letters by Eukalyptus ;)"
[/autoit] [autoit][/autoit] [autoit]$hPath = _CreateTextPath($sText, 400, "Impact", 110)
[/autoit] [autoit][/autoit] [autoit]$hMatrix = _GDIPlus_MatrixCreate()
[/autoit] [autoit][/autoit] [autoit]GUIRegisterMsg($WM_PAINT, "WM_PAINT")
GUIRegisterMsg($WM_ERASEBKGND, "WM_ERASEBKGND")
Global $aPoints[5][2]
$aPoints[0][0] = 4
$aPoints[1][0] = $iW / 2 - $iW * 0.2
$aPoints[1][1] = $iH / 2 - $iH * 0.2
$aPoints[2][0] = $iW / 2 + $iW * 0.2
$aPoints[2][1] = $iH / 2 - $iH * 0.2
$aPoints[3][0] = 0
$aPoints[3][1] = $iH
$aPoints[4][0] = $iW
$aPoints[4][1] = $iH
While 1
_RotateMatrix()
$hPathClone = _GDIPlus_PathClone($hPath)
_GDIPlus_PathTransform($hPathClone, $hMatrix)
_GDIPlus_PathWarp($hPathClone, 0, $aPoints, 0, 0, $iW, $iH + $iH * 0.3)
_GDIPlus_GraphicsFillRect($hGfxBuffer, 0, 0, $iW, $iH, $hBrushTrans)
_GDIPlus_GraphicsFillPath($hGfxBuffer, $hPathClone, $hBrush)
_GDIPlus_PathDispose($hPathClone)
[/autoit] [autoit][/autoit] [autoit]_GDIPlus_GraphicsDrawImage($hGraphics, $hBmpBuffer, 0, 0)
;Sleep(10)
WEnd
Func _RotateMatrix()
Local Static $iStep = 0
$iStep += 0.003
_GDIPlus_MatrixSetElements($hMatrix, 1, 0, 0, 1, 0, 0)
_GDIPlus_MatrixTranslate($hMatrix, $iW / 2, $iH / 2)
_GDIPlus_MatrixRotate($hMatrix, -(Sin($iStep) * 360))
_GDIPlus_MatrixTranslate($hMatrix, -$iW / 2, -$iH / 2)
EndFunc ;==>_RotateMatrix
Func _CreateTextPath($sText, $iR, $sFont, $fSize)
Local $hPath = _GDIPlus_PathCreate()
Local $hFormat = _GDIPlus_StringFormatCreate()
Local $hFamily = _GDIPlus_FontFamilyCreate("Arial")
Local $tLayout = _GDIPlus_RectFCreate(0, 0, 0, 0)
Local $aSplit = StringSplit($sText, "")
Local $aPath[$aSplit[0] + 1][2]
Local $aBounds, $iLen = 0
Local $hMatrix = _GDIPlus_MatrixCreate()
[/autoit] [autoit][/autoit] [autoit]For $i = 1 To $aSplit[0]
$aPath[$i][0] = _GDIPlus_PathCreate()
_GDIPlus_PathAddString($aPath[$i][0], $aSplit[$i], $tLayout, $hFamily, 0, $fSize, $hFormat)
$aBounds = _GDIPlus_PathGetWorldBounds($aPath[$i][0])
$aPath[$i][1] = $aBounds[2]
If $aSplit[$i] = " " Then $aPath[$i][1] = $fSize / 3
$iLen += $aPath[$i][1]
_GDIPlus_MatrixTranslate($hMatrix, $iW / 2 - $aBounds[2], $iH / 2 - $iR)
_GDIPlus_PathTransform($aPath[$i][0], $hMatrix)
_GDIPlus_MatrixSetElements($hMatrix, 1, 0, 0, 1, 0, 0)
Next
For $i = 1 To $aSplit[0]
_GDIPlus_MatrixTranslate($hMatrix, $iW / 2, $iH / 2)
_GDIPlus_MatrixRotate($hMatrix, -($aPath[$i][1] * 340 / $iLen))
_GDIPlus_MatrixTranslate($hMatrix, -$iW / 2, -$iH / 2)
_GDIPlus_PathTransform($hPath, $hMatrix)
_GDIPlus_PathAddPath($hPath, $aPath[$i][0], False)
[/autoit] [autoit][/autoit] [autoit]_GDIPlus_MatrixSetElements($hMatrix, 1, 0, 0, 1, 0, 0)
Next
_GDIPlus_FontFamilyDispose($hFamily)
_GDIPlus_StringFormatDispose($hFormat)
_GDIPlus_MatrixDispose($hMatrix)
For $i = 1 To $aSplit[0]
_GDIPlus_PathDispose($aPath[$i][0])
Next
Return $hPath
EndFunc ;==>_CreateTextPath
Func WM_PAINT($hWnd, $uMsgm, $wParam, $lParam)
_GDIPlus_GraphicsDrawImage($hGraphics, $hBmpBuffer, 0, 0)
Return $GUI_RUNDEFMSG
EndFunc ;==>WM_PAINT
Func WM_ERASEBKGND($hWnd, $uMsgm, $wParam, $lParam)
_GDIPlus_GraphicsDrawImage($hGraphics, $hBmpBuffer, 0, 0)
Return True
EndFunc ;==>WM_ERASEBKGND
Func _Exit()
_GDIPlus_BrushDispose($hBrush)
_GDIPlus_BrushDispose($hBrushTrans)
_GDIPlus_GraphicsDispose($hGfxBuffer)
_GDIPlus_BitmapDispose($hBmpBuffer)
_GDIPlus_GraphicsDispose($hGraphics)
_GDIPlus_Shutdown()
Exit
EndFunc ;==>_Exit
Func _CheckGDIpWarpBug($sPath)
If Not FileExists($sPath) Then
MsgBox(0, "error", $sPath & " not found")
Return
EndIf
Local $sSource = FileRead($sPath)
Local $aRegExp = StringRegExp($sSource, "(?is)Func\h+_GDIPlus_PathWarp(.*?)EndFunc", 3)
If Not IsArray($aRegExp) Then
MsgBox(0, "error", "Func _GDIPlus_PathWarp not found in" & @CRLF & $sPath)
Return
EndIf
If StringRegExp($aRegExp[0], "(?i)\$iCount\h+<>\h+3\h+Or") Then
$sSource = StringLeft($sSource, StringInStr($sSource, "Func _GDIPlus_PathWarp"))
$aRegExp[0] = StringLeft($aRegExp[0], StringInStr($aRegExp[0], "If $iCount <> 3"))
Local $iLine = 1
StringRegExpReplace($sSource, "\r", "")
$iLine += @extended
StringRegExpReplace($aRegExp[0], "\r", "")
$iLine += @extended
MsgBox(0, "error found", "error in " & $sPath & @CRLF & "change line " & $iLine & @CRLF & "If $iCount <> 3 Or $iCount <> 4 Then" & @CRLF & "to:" & @CRLF & "If $iCount <> 3 And $iCount <> 4 Then")
EndIf
EndFunc ;==>_CheckGDIpWarpBug
Rotated Letters:
Spoiler anzeigen
;coded by UEZ 2011 build 2011-04-06
;~ #AutoIt3Wrapper_AU3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6
#AutoIt3Wrapper_Run_Obfuscator=y
#Obfuscator_Parameters=/sf /sv /om /cs=0 /cn=0
#AutoIt3Wrapper_Run_After=del /f /q "%scriptdir%\%scriptfile%_Obfuscated.au3"
#AutoIt3Wrapper_UseUpx=y
#AutoIt3Wrapper_UPX_Parameters=--brute --crp-ms=999999 --all-methods --all-filters
#include <Array.au3>
#include <GDIPlus.au3>
Opt("GUIOnEventMode", 1)
Opt("MustDeclareVars", 1)
_GDIPlus_Startup()
[/autoit] [autoit][/autoit] [autoit]Global Const $iW = 600
Global Const $iH = 600
Global Const $iW2 = $iW / 2
Global Const $iH2 = $iH / 2
Global Const $hgui = GUICreate("GDI+ Rotated Letters by UEZ 2011 Beta", $iW, $iH)
GUISetBkColor(0x202040, $hgui)
WinSetTrans($hgui, "", 0xFF)
GUISetState()
Global $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hgui)
Global $hBitmap = _GDIPlus_BitmapCreateFromGraphics($iW, $iH, $hGraphic)
Global $hBackbuffer = _GDIPlus_ImageGetGraphicsContext($hBitmap)
_GDIPlus_GraphicsSetSmoothingMode($hBackbuffer, 2)
Global $ps = 4
Global $hPen = _GDIPlus_PenCreate(0xFFFFA000, $ps)
Global $radius = 250
Global $sText = " Rotated Letters by UEZ 2011 Beta #"
Global $hBMP = CreateRotatedLetters($sText, $iW, $iH)
Global $hMatrix = _GDIPlus_MatrixCreate()
_GDIPlus_GraphicsDrawImageRect($hBackbuffer, $hBMP, 0, 0, $iW, $iH)
GUISetOnEvent(-3, "_Exit")
Global $i = 0
While Sleep(10)
$i -= 0.01
_GDIPlus_GraphicsClear($hBackbuffer, 0x80202020)
_GDIPlus_GraphicsDrawImageRect($hBackbuffer, $hBMP, 0, 0, $iW, $iH)
_GDIPlus_GraphicsDrawEllipse($hBackbuffer, $ps - 2, $ps - 2, $iW - $ps - 2, $iH - $ps - 2, $hPen)
_GDIPlus_GraphicsDrawEllipse($hBackbuffer, 95, 95, $iW - 2 * 95, $iH - 2 * 95, $hPen)
_GDIPlus_MatrixTranslate($hMatrix, $iW2, $iH2)
_GDIPlus_MatrixRotate($hMatrix, Sin($i), False)
_GDIPlus_MatrixTranslate($hMatrix, -$iW2, -$iH2)
_GDIPlus_GraphicsSetTransform($hBackbuffer, $hMatrix)
_GDIPlus_GraphicsDrawImageRect($hGraphic, $hBitmap, 0, 0, $iW, $iH)
WEnd
Func CreateRotatedLetters($sText, $iW, $iH, $fontsize = 60, $radius = 250, $letter_w = 100, $letter_h = 100, $font = "Impact", $rv = 20, $gv = 100, $bv = 240, $start_angle = 0)
Local Const $iW2 = $iW / 2
Local Const $iH2 = $iH / 2
Local Const $sLen = StringLen($sText)
Local $j = $sLen / 2
Local Const $delta_a = Floor(360 / $sLen)
Local Const $letter_w2 = $letter_w / 2
Local Const $letter_h2 = $letter_h / 2
Local Const $center_x = $iW2 - $letter_w2
Local Const $center_y = $iH2 - $letter_h2
Local Const $deg = ACos(-1) / 180
Local $aTable[$sLen][12]
Local $i, $r, $g, $b, $a, $lW, $lH, $x, $y
Local $hImage = _GDIPlus_BitmapCreateFromScan0($iW, $iH)
Local $hContext = _GDIPlus_ImageGetGraphicsContext($hImage)
For $i = 0 To $sLen - 1 ;generate table
$aTable[$i][0] = StringMid($sText, $i + 1, 1) ;get next letter
$aTable[$i][1] = _GDIPlus_BitmapCreateFromScan0($letter_w, $letter_h) ;create bitmap
$aTable[$i][2] = _GDIPlus_ImageGetGraphicsContext($aTable[$i][1]) ;create context of bitmap to draw to bitmap
$r = 0xFF - Sin($j / 10) * $rv
$g = 0xFF - Sin($j / 10) * $gv
$b = 0xFF - Sin($j / 10) * $bv
$j -= 0.5
$aTable[$i][3] = _GDIPlus_BrushCreateSolid("0xFF" & Hex($r, 2) & Hex($g, 2) & Hex($b, 2))
$aTable[$i][4] = _GDIPlus_StringFormatCreate() ;$hFormat
$aTable[$i][5] = _GDIPlus_FontFamilyCreate($font) ;$hFamily
$aTable[$i][6] = _GDIPlus_FontCreate($aTable[$i][5], $fontsize) ;$hFont
$aTable[$i][7] = _GDIPlus_RectFCreate(0, 0, 0, 0) ;$tLayout
$aTable[$i][8] = _GDIPlus_GraphicsMeasureString($hGraphic, $aTable[$i][0], $aTable[$i][6], $aTable[$i][7], $aTable[$i][4])
$aTable[$i][9] = _GDIPlus_MatrixCreate() ;create a matrix for each letter
$aTable[$i][10] = $i * $delta_a + $start_angle ;calculate angle of letter
$aTable[$i][11] = $radius ;radius
_GDIPlus_GraphicsSetSmoothingMode($aTable[$i][2], 2)
DllCall($ghGDIPDll, "uint", "GdipSetTextRenderingHint", "handle", $aTable[$i][2], "int", 3)
_GDIPlus_GraphicsClear($aTable[$i][2], 0x00000000)
;calculated possition of letter to place it in the middle of the graphic
$a = $aTable[$i][8]
$lW = DllStructGetData($a[0], "width")
$lH = DllStructGetData($a[0], "height")
DllStructSetData($a[0], "x", $letter_w2 - $lW / 2)
DllStructSetData($a[0], "y", $letter_h2 - $lH / 2)
;rotate letter
_GDIPlus_MatrixTranslate($aTable[$i][9], $letter_w2, $letter_h2)
_GDIPlus_MatrixRotate($aTable[$i][9], -27 + $aTable[$i][10], False)
_GDIPlus_MatrixTranslate($aTable[$i][9], -$letter_w2, -$letter_h2)
_GDIPlus_GraphicsSetTransform($aTable[$i][2], $aTable[$i][9])
;print letter to bitmap
_GDIPlus_GraphicsDrawStringEx($aTable[$i][2], $aTable[$i][0], $aTable[$i][6], $a[0], $aTable[$i][4], $aTable[$i][3])
;copy letter to main screen in a circle
$x = $center_x + Cos(-90 + $aTable[$i][10] * $deg) * $aTable[$i][11]
$y = $center_y + Sin(-90 + $aTable[$i][10] * $deg) * $aTable[$i][11]
_GDIPlus_GraphicsDrawImage($hContext, $aTable[$i][1], $x, $y)
Next
For $i = 0 To $sLen - 1
_GDIPlus_BitmapDispose($aTable[$i][1])
_GDIPlus_GraphicsDispose($aTable[$i][2])
_GDIPlus_BrushDispose($aTable[$i][3])
_GDIPlus_StringFormatDispose($aTable[$i][4])
_GDIPlus_FontFamilyDispose($aTable[$i][5])
_GDIPlus_FontDispose($aTable[$i][6])
_GDIPlus_MatrixDispose($aTable[$i][9])
Next
_GDIPlus_GraphicsDispose($hContext)
Return $hImage
EndFunc ;==>CreateRotatedLetters
Func _GDIPlus_BitmapCreateFromScan0($iWidth, $iHeight, $iStride = 0, $iPixelFormat = 0x0026200A, $pScan0 = 0)
Local $aResult = DllCall($ghGDIPDll, "uint", "GdipCreateBitmapFromScan0", "int", $iWidth, "int", $iHeight, "int", $iStride, "int", $iPixelFormat, "ptr", $pScan0, "int*", 0)
If @error Then Return SetError(@error, @extended, 0)
Return $aResult[6]
EndFunc ;==>_GDIPlus_BitmapCreateFromScan0
Func _Exit()
_GDIPlus_MatrixDispose($hMatrix)
_GDIPlus_GraphicsDispose($hBackbuffer)
_GDIPlus_BitmapDispose($hBitmap)
_GDIPlus_BitmapDispose($hBMP)
_GDIPlus_GraphicsDispose($hGraphic)
_GDIPlus_Shutdown()
GUIDelete($hgui)
Exit
EndFunc ;==>_Exit
Ballet of Letters:
Spoiler anzeigen
;coded by UEZ 2011 build 2011-04-08
#AutoIt3Wrapper_AU3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6
#AutoIt3Wrapper_Run_Obfuscator=y
#Obfuscator_Parameters=/sf /sv /om /cs=0 /cn=0
#AutoIt3Wrapper_Run_After=del /f /q "%scriptdir%\%scriptfile%_Obfuscated.au3"
#AutoIt3Wrapper_UseUpx=y
#AutoIt3Wrapper_UPX_Parameters=--brute --crp-ms=999999 --all-methods --all-filters
#include <Array.au3>
#include <GDIPlus.au3>
Opt("GUIOnEventMode", 1)
_GDIPlus_Startup()
[/autoit] [autoit][/autoit] [autoit]Global Const $iW = 600
Global Const $iW2 = $iW / 2
Global Const $iH = 600
Global Const $iH2 = $iH / 2
Global $hgui = GUICreate("GDI+ Ballet of Letters by UEZ 2011 Build 2011-04-08", $iW, $iH)
GUISetBkColor(0x000000, $hgui)
Global $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hgui)
Global $hBitmap = _GDIPlus_BitmapCreateFromGraphics($iW, $iH, $hGraphic)
Global $hBackbuffer = _GDIPlus_ImageGetGraphicsContext($hBitmap)
Global $hPen = _GDIPlus_PenCreate(0)
;~ _GDIPlus_GraphicsSetSmoothingMode($hBackbuffer, 2)
[/autoit] [autoit][/autoit] [autoit]Global $sText = " Ballet of Letters by UEZ 2011 #"
Const $sLen = StringLen($sText)
Const $delta_a = Floor(360 / $sLen)
Const $letter_w = 100
Const $letter_w2 = $letter_w / 2
Const $letter_h = 100
Const $letter_h2 = $letter_h / 2
Const $center_x = $iW2 - $letter_w2
Const $center_y = $iH2 - $letter_h2
Const $font = "Impact"
Const $fontsize = $sLen * 1.75
Const $radius = 220
Const $deg = ACos(-1) / 180
Global $aTable[$sLen][12]
Global $j = $sLen / 2, $r, $g, $b, $a, $lW, $lH, $x, $y
For $i = 0 To $sLen - 1 ;generate table
$aTable[$i][0] = StringMid($sText, $i + 1, 1) ;get next letter
$aTable[$i][1] = _GDIPlus_BitmapCreateFromGraphics($letter_w, $letter_h, $hGraphic) ;create bitmap
$aTable[$i][2] = _GDIPlus_ImageGetGraphicsContext($aTable[$i][1]) ;create context of bitmap to draw to bitmap
$r = 0xFF - Sin($j / 10) * 20
$g = 0xFF - Sin($j / 10) * 100
$b = 0xFF - Sin($j / 10) * 220
$j -= 0.5
$aTable[$i][3] = _GDIPlus_BrushCreateSolid("0xE0" & Hex($r, 2) & Hex($g, 2) & Hex($b, 2))
$aTable[$i][4] = _GDIPlus_StringFormatCreate() ;$hFormat
$aTable[$i][5] = _GDIPlus_FontFamilyCreate($font) ;$hFamily
$aTable[$i][6] = _GDIPlus_FontCreate($aTable[$i][5], $fontsize) ;$hFont
$aTable[$i][7] = _GDIPlus_RectFCreate(0, 0, 0, 0) ;$tLayout
$aTable[$i][8] = _GDIPlus_GraphicsMeasureString($hGraphic, $aTable[$i][0], $aTable[$i][6], $aTable[$i][7], $aTable[$i][4])
$aTable[$i][9] = _GDIPlus_MatrixCreate() ;create a matrix for each letter
$aTable[$i][10] = $i * $delta_a ;calculate angle of letter
$aTable[$i][11] = $radius ;radius
_GDIPlus_GraphicsSetSmoothingMode($aTable[$i][2], 2)
DllCall($ghGDIPDll, "uint", "GdipSetTextRenderingHint", "handle", $aTable[$i][2], "int", 4)
;~ DllCall($ghGDIPDll, "uint", "GdipSetTextRenderingHint", "handle", $hBackbuffer, "int", 4)
_GDIPlus_GraphicsClear($aTable[$i][2], 0x00000000)
;calculated possition of letter to place it in the middle of the graphic
$a = $aTable[$i][8]
$lW = DllStructGetData($a[0], "width")
$lH = DllStructGetData($a[0], "height")
DllStructSetData($a[0], "x", $letter_w2 - $lW / 2)
DllStructSetData($a[0], "y", $letter_h2 - $lH / 2)
;rotate letter
_GDIPlus_MatrixTranslate($aTable[$i][9], $letter_w2, $letter_h2)
_GDIPlus_MatrixRotate($aTable[$i][9], -27 + $aTable[$i][10], False)
_GDIPlus_MatrixTranslate($aTable[$i][9], -$letter_w2, -$letter_h2)
_GDIPlus_GraphicsSetTransform($aTable[$i][2], $aTable[$i][9])
;print letter to graphic
_GDIPlus_GraphicsDrawStringEx($aTable[$i][2], $aTable[$i][0], $aTable[$i][6], $a[0], $aTable[$i][4], $aTable[$i][3])
;copy letter to main screen in a circle
$x = $center_x + Cos(-90 + $aTable[$i][10] * $deg) * $aTable[$i][11]
$y = $center_y + Sin(-90 + $aTable[$i][10] * $deg) * $aTable[$i][11]
_GDIPlus_GraphicsDrawImage($hBackbuffer, $aTable[$i][1], $x, $y)
Next
Global Const $warpZ = 16
Global Const $units = 200
Global $cycle = 0 ;for color
Global Const $Z = 0.1
Global $stars[$units][5] ;x,y,z,px,py
Global $cx = $iW2, $cy = $iH2
For $i = 0 To $units - 1
Reset_Star($i)
Next
GUISetState()
[/autoit] [autoit][/autoit] [autoit]GUISetOnEvent(-3, "_Exit")
[/autoit] [autoit][/autoit] [autoit]While Sleep(10)
_GDIPlus_GraphicsClear($hBackbuffer, 0x70000000)
Draw_Stars()
Rotation()
_GDIPlus_GraphicsDrawImage($hGraphic, $hBitmap, 0, 0)
WEnd
Func Rotation()
Local Static $aa = 0
Local Static $bb = 0
Local Static $c = 1
$aa += 0.01
$bb += 1.5 * $c
If $bb < -50 Or $bb > 50 Then $c *= -1
For $i = 0 To $sLen - 1
_GDIPlus_GraphicsClear($aTable[$i][2], 0x00000000)
$aTable[$i][10] -= 1.5 * Cos($aa)
$aTable[$i][11] += -$bb / 8 + Cos($bb ^2* $aa)
$a = $aTable[$i][8]
_GDIPlus_MatrixTranslate($aTable[$i][9], $letter_w2, $letter_h2)
_GDIPlus_MatrixRotate($aTable[$i][9], -1 + Sin($aa) * 15, False)
[/autoit] [autoit][/autoit] [autoit]_GDIPlus_MatrixTranslate($aTable[$i][9], -$letter_w2, -$letter_h2)
_GDIPlus_GraphicsSetTransform($aTable[$i][2], $aTable[$i][9])
_GDIPlus_GraphicsDrawStringEx($aTable[$i][2], $aTable[$i][0], $aTable[$i][6], $a[0], $aTable[$i][4], $aTable[$i][3])
$x = $center_x + Cos(-90 * (1 + Sin(-$aa / 100)) + $aTable[$i][10] * $deg) * $aTable[$i][11]
$y = $center_y + Sin(-90 * (1 + Cos($aa / 20)) + $aTable[$i][10] * $deg) * $aTable[$i][11]
_GDIPlus_GraphicsDrawImage($hBackbuffer, $aTable[$i][1], $x, $y)
Next
EndFunc ;==>Rotation1
Func Draw_Stars()
Local $i, $r, $g, $b, $xx, $yy, $e, $color
Local Static $ii = -99
$ii += 0.0075
$cx = $iW2 + (110 * Cos($ii * 3))
$cy = $iH2 + (100 * Sin($ii * 4))
For $i = 0 To $units - 1
$xx = $stars[$i][0] / $stars[$i][2]
$yy = $stars[$i][1] / $stars[$i][2]
$e = 1 + 1 / $stars[$i][2] * 2
If $stars[$i][3] <> 0 Then
$r = 0x40 + Sin($i + $cycle) * 50
$g = 0x40 + Sin($i + $cycle) * 50
$b = 0x40 + Sin($i + $cycle) * 50
$color = "0xF0"& Hex($r, 2) & Hex($g, 2) & Hex($b, 2)
_GDIPlus_PenSetWidth($hPen, $e)
_GDIPlus_PenSetColor($hPen, $color)
_GDIPlus_GraphicsDrawRect($hBackbuffer, $xx + $cx, $yy + $cy, $e, $e, $hPen)
EndIf
$stars[$i][2] -= $Z
$stars[$i][3] = $xx
$stars[$i][4] = $yy
If $stars[$i][2] < $Z Or $stars[$i][3] > $iW Or $stars[$i][4] > $iH Then Reset_Star($i)
Next
$cycle += 0.1
EndFunc
Func Reset_Star($a)
$stars[$a][0] = (Random(0, 1) * $iW - ($iW / 2)) * $warpZ
$stars[$a][1] = (Random(0, 1) * $iH - ($iH / 2)) * $warpZ
$stars[$a][2] = $warpZ
$stars[$a][3] = 0
$stars[$a][4] = 0
EndFunc
Func _Exit()
_GDIPlus_PenDispose($hPen)
For $i = 0 To $sLen - 1
_GDIPlus_BitmapDispose($aTable[$i][1])
_GDIPlus_GraphicsDispose($aTable[$i][2])
_GDIPlus_BrushDispose($aTable[$i][3])
_GDIPlus_StringFormatDispose($aTable[$i][4])
_GDIPlus_FontFamilyDispose($aTable[$i][5])
_GDIPlus_FontDispose($aTable[$i][6])
_GDIPlus_MatrixDispose($aTable[$i][9])
Next
_GDIPlus_GraphicsDispose($hBackbuffer)
_GDIPlus_BitmapDispose($hBitmap)
_GDIPlus_GraphicsDispose($hGraphic)
_GDIPlus_Shutdown()
GUIDelete($hgui)
Exit
EndFunc ;==>_Exit
Vielleicht gefällt es ja euch!
Gruß,
UEZ
Edit: GDIp.au3 gibts hier: http://www.autoitscript.com/forum/topic/106021-gdip-au3