UEZ Posted October 27, 2015 Posted October 27, 2015 (edited) Here a little Outro for all the animation lovers which I created when I played around with spheres.Download: Sphere Outro.7z --=> 7-Zip archive Credits:Eukalyptus (GDIPlusEx.au3 -> don't search for it because it is not released for the public )wakillon & TitchySID.dll creator If it is too slow reduce the stars in line 77 (-=> $iStars)If you cannot see the fade in/out text change in line 152 the font name from "Plantagenet Cherokee" to "Times New Roman"! Edited November 1, 2015 by UEZ argumentum, coffeeturtle and wakillon 3 Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ
wakillon Posted October 28, 2015 Posted October 28, 2015 Nice work UEZ ! Where did you find this Sid Tune ?and why there is 2 _GDIPlus_Startup ? may be an oversight ? AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts
UEZ Posted October 28, 2015 Author Posted October 28, 2015 (edited) Nice work UEZ ! Where did you find this Sid Tune ?and why there is 2 _GDIPlus_Startup ? may be an oversight ? Thanks @kyo and @wakillon for your feedback.The two _GDIPlus_Startup calls are the result of embedding the GDIPlusEx into the script which I've overseen but has no impact. Thanks for the information.The SID is called "Arsch Blumen" and I cannot remember where I downloaded it. Edited October 28, 2015 by UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ
wakillon Posted October 28, 2015 Posted October 28, 2015 May be here ?About GDIPlusEx, it's a new version ? AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts
UEZ Posted October 28, 2015 Author Posted October 28, 2015 May be here ?About GDIPlusEx, it's a new version ?GDIPlusEx.au3 is a creation by the guru Eukalyptus which isn't released for the public at the moment. I cannot tell you whether he will publish it ever. Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ
wakillon Posted October 28, 2015 Posted October 28, 2015 I saw some ASM and Object parts.I suppose It's more faster...According to you, are there other improvements ? AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts
UEZ Posted October 28, 2015 Author Posted October 28, 2015 (edited) Some functions are faster, e.g. creating a trapezoid effect:Here the non ASM version:expandcollapse popup#include <Screencapture.au3> #Region example _GDIPlus_Startup() Global Const $iW = @DesktopWidth, $iH = @DesktopHeight Global $hHBitmap = _ScreenCapture_Capture("", 1, 1, $iW, $iH) Global $hBitmap = _GDIPlus_BitmapCreateFromHBITMAP($hHBitmap) _WinAPI_DeleteObject($hHBitmap) ; x1,y1---------x2,y2 ; | | ; | | ; | | ; x3,y3---------x4,y4; Global $fTimer = TimerInit() Global $hBitmap_Result = _GDIPlus_BitmapCreateTrapezoid($hBitmap, $iW * 0.33, $iH * 0.10, _ ;x1, y1 $iW * 0.66, $iH * 0.15, _ ;x2, y2 $iW * 0.02, $iH * 0.95, _ ;x3, y3 $iW * 0.975, $iH * 0.75) ;x4, y4 ConsoleWrite(TimerDiff($fTimer) & " ms" & @CRLF) FileDelete(@ScriptDir & "\Trapezoid.png") _GDIPlus_ImageSaveToFile($hBitmap_Result, @ScriptDir & "\Trapezoid.png") ShellExecute(@ScriptDir & "\Trapezoid.png") _GDIPlus_ImageDispose($hBitmap) _GDIPlus_ImageDispose($hBitmap_Result) _GDIPlus_Shutdown() #EndRegion Func _GDIPlus_BitmapCreateTrapezoid($hBitmap, $iX1, $iY1, $iX2, $iY2, $iX3, $iY3, $iX4, $iY4, $iTiles = 80, $bAutoTile = False) ;build 2015-08-07 beta by UEZ Local Const $aDim = _GDIPlus_ImageGetDimension($hBitmap) If $bAutoTile Then $iTiles = Round(Sqrt(1.5 * $aDim[0] * $aDim[1]) / 12, 0) $iTiles = $iTiles < 2 ? 2 : $iTiles > $aDim[0] / 2 ? Round(($aDim[0] / 2) / 10, 0) * 10 : $iTiles > $aDim[1] / 2 ? Round(($aDim[1] / 2) / 10, 0) * 10 : $iTiles Local Const $hPath = _GDIPlus_PathCreate() Local $i2Tiles = $iTiles^2, $iTile_W = $aDim[0] / $iTiles, $iTile_H = $aDim[1] / $iTiles, $aBmp_Tiles[$i2Tiles * 2] Local $iX, $iY, $i = 0, $j = 1 ConsoleWrite("Tiles #: " & $iTiles & @CRLF) ConsoleWrite("Tiles dim: " & $iTile_W & " x " & $iTile_H & @CRLF) ;add raster to tile image For $iY = 0 To $aDim[1] Step Int($iTile_H * 100) / 100 For $iX = 0 To $aDim[0] Step Int($iTile_W * 100) / 100 _GDIPlus_PathAddRectangle($hPath, $iX, $iY, 1, 1) If Mod($j, $iTiles + 1) And $i < $i2Tiles Then $aBmp_Tiles[$i] = _GDIPlus_BitmapCloneArea($hBitmap, $iX, $iY, $iTile_W, $iTile_H, $GDIP_PXF32ARGB) $i += 1 EndIf $j += 1 Next Next ;warp path points Local $aCoord_Rect[5][2] $aCoord_Rect[0][0] = 4 $aCoord_Rect[1][0] = $iX1 $aCoord_Rect[1][1] = $iY1 $aCoord_Rect[2][0] = $iX2 $aCoord_Rect[2][1] = $iY2 $aCoord_Rect[3][0] = $iX3 $aCoord_Rect[3][1] = $iY3 $aCoord_Rect[4][0] = $iX4 $aCoord_Rect[4][1] = $iY4 _GDIPlus_PathWarp($hPath, 0, $aCoord_Rect, 0, 0, $aDim[0], $aDim[1]) Local Const $hImage = _GDIPlus_BitmapCreateFromScan0($aDim[0], $aDim[1]) Local Const $hCanvas = _GDIPlus_ImageGetGraphicsContext($hImage) _GDIPlus_GraphicsSetPixelOffsetMode($hCanvas, 4) _GDIPlus_GraphicsSetInterpolationMode($hCanvas, 3) ;increases image quality but slows down overall performance ;~ _GDIPlus_GraphicsSetCompositingMode($hCanvas, 0) ;~ _GDIPlus_GraphicsSetCompositingQuality($hCanvas, 2) Local Const $aPos = _GDIPlus_PathGetPoints($hPath) ;4 coordinates per pixels Local $tPoint = DllStructCreate("float X1;float Y1;float X2;float Y2;float X3;float Y3") ;create image according to warped points using tiled bitmaps $i = 0 $j = 1 Do $tPoint.X1 = ($aPos[$j][0]) $tPoint.Y1 = ($aPos[$j][1]) $c = $j + 5 $tPoint.X2 = ($aPos[$c][0]) $tPoint.Y2 = ($aPos[$c][1]) $c = $j + (1 + $iTiles) * 4 + 3 $tPoint.X3 = ($aPos[$c][0]) $tPoint.Y3 = ($aPos[$c][1]) DllCall($__g_hGDIPDll, "int", "GdipDrawImagePoints", "handle", $hCanvas, "handle", $aBmp_Tiles[$i], "struct*", $tPoint, "int", 3) _GDIPlus_BitmapDispose($aBmp_Tiles[$i]) $i += 1 $j += 4 If Not Mod($i, $iTiles) Then $j += 4 Until $i = $i2Tiles ;$j + (1 + $iTiles) * 4 + 3 >= $aPos[0][0] ; ;~ Local $hPen = _GDIPlus_PenCreate(0xE0FF0000, 2) ;~ _GDIPlus_GraphicsDrawPath($hCanvas, $hPath, $hPen) ;~ _GDIPlus_PenDispose($hPen) _GDIPlus_PathDispose($hPath) _GDIPlus_GraphicsDispose($hCanvas) Return $hImage EndFunc ;==>_GDIPlus_BitmapCreateTrapezoid Edited October 28, 2015 by UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ
argumentum Posted October 29, 2015 Posted October 29, 2015 Here a little Outro for all the animation lovers which I created when I played around with spheres.Download: Sphere Outro.7z -> 7-Zip archiveSorry, there is a problemThe page you are trying to access is not available for your account.Error code: 2C171/1 Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
UEZ Posted October 29, 2015 Author Posted October 29, 2015 Sorry argumentum but there is a bug in the forum software which changed the source of the file from here to mailbox.The link should be fixed now.Thanks. argumentum 1 Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now