Search the Community

Showing results for tags 'animation'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Chat
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • Forum
  • AutoIt

Calendars

  • Community Calendar

Found 10 results

  1. Since monoceres has released I'm searching for a way to map the 2D image of the earth to a 3D sphere with rotation. Here the result (after 9 years!) as a non realistic physical animation: ==> Due to the fact that AutoIt / GDI+ are not that fast I couldn't add a moon animation additionally. Thanks to one of Eukalyptus' code to pointing me to the right direction. U rock man. Source code extract only - not working because of missing binary data (images): ;coded by UEZ build 2017-02-25 #pragma compile(Icon, "c:\Program Files (x86)\AutoIt3\Icons\au3.ico") #AutoIt3Wrapper_Run_Au3Stripper=y #Au3Stripper_Parameters=/so /pe /rm #AutoIt3Wrapper_Run_After=del /f /q "%scriptdir%\%scriptfile%_stripped.au3" #include <GDIPlus.au3> #include <GuiConstantsEx.au3> #include <WindowsConstants.au3> _GDIPlus_Startup() Global $hGUI, $iFPS = 0, $iShowFPS = 0, $bExit Global Const $iW = 800, $iH = 500, $iWh = $iW / 2, $iHh = $iH / 2, $sTitle = "GDI+ Rotating Earth coded by UEZ 2017" Global Const $fPi = ACos(-1), $fRad = $fPi / 180, $fDeg = 180 / $fPi AutoItSetOption("GUIOnEventMode", 1) GDIPlus_RotatingEarth() AutoItSetOption("GUIOnEventMode", 0) _GDIPlus_Shutdown() Func GDIPlus_RotatingEarth() $bExit = False $hGUI = GUICreate($sTitle, $iW, $iH) ;, 0, 0, $WS_POPUP) GUISetState(@SW_SHOW, $hGUI) ;~ GUISetCursor(16, 1) ;create canvas elements Local Const $hDC = _WinAPI_GetDC($hGUI) Local Const $hHBitmap = _WinAPI_CreateCompatibleBitmap($hDC, $iW, $iH) Local Const $hDC_backbuffer = _WinAPI_CreateCompatibleDC($hDC) Local Const $DC_obj = _WinAPI_SelectObject($hDC_backbuffer, $hHBitmap) Local Const $hCanvas = _GDIPlus_GraphicsCreateFromHDC($hDC_backbuffer) _GDIPlus_GraphicsSetSmoothingMode($hCanvas, $GDIP_SMOOTHINGMODE_HIGHQUALITY) _GDIPlus_GraphicsSetPixelOffsetMode($hCanvas, $GDIP_PIXELOFFSETMODE_HIGHQUALITY) Local Const $hBrush_Clr = _GDIPlus_BrushCreateSolid(0xFF000000), _ $hBrush_FPS = _GDIPlus_BrushCreateSolid(0xFFF0F0F0), _ $hFormat_FPS = _GDIPlus_StringFormatCreate(), _ $hFamily_FPS = _GDIPlus_FontFamilyCreate("Arial"), _ $hFont_FPS = _GDIPlus_FontCreate($hFamily_FPS, 8), _ $tLayout_FPS = _GDIPlus_RectFCreate(0, 0, 60, 16), _ $hImage_Earth = _GDIPlus_BitmapCreateFromMemory(_Earth()), _ $hImage_Galaxy = _GDIPlus_BitmapCreateFromMemory(_Galaxy()), _ $hMatrix = _GDIPlus_MatrixCreate(), $hPath = _GDIPlus_PathCreate() Local $aDim = _GDIPlus_ImageGetDimension($hImage_Earth) Local Const $hGfx = _GDIPlus_ImageGetGraphicsContext($hImage_Earth) _GDIPlus_GraphicsDrawStringEx($hGfx, "Coded by UEZ 2017 ;-)", $hFont_FPS, _GDIPlus_RectFCreate(0, $aDim[1] / 2 - 4, 120, 12), $hFormat_FPS, $hBrush_FPS) _GDIPlus_ImageDispose($hGfx) Local Const $hTexture_Earth = _GDIPlus_TextureCreate($hImage_Earth) DllCall($__g_hGDIPDll, "int", "GdipTranslateTextureTransform", "ptr", $hTexture_Earth, "float", -200, "float", 0, "long", 0) Local $iDiameter = $aDim[0] < $aDim[1] ? $aDim[0] : $aDim[1], _ $iDiameter2 = $iDiameter / 2, _ $fDX = ($iW - $iDiameter) / 2, $fDY = ($iH - $iDiameter) / 2 _GDIPlus_PathAddEllipse($hPath, $fDX - 1, $fDY - 1, $iDiameter + 2, $iDiameter + 2) Local Const $hBrush = _GDIPlus_PathBrushCreateFromPath($hPath) _GDIPlus_PathBrushSetCenterColor($hBrush, 0x04000008) _GDIPlus_PathBrushSetCenterPoint($hBrush, $fDX + $iDiameter2 + 1, $fDY + $iDiameter2 + 1) _GDIPlus_PathBrushSetSurroundColor($hBrush, 0xF0000000) _GDIPlus_PathBrushSetGammaCorrection($hBrush, 1) _GDIPlus_PathBrushSetFocusScales($hBrush, 0.5, 0.5) $iFPS = 0 GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit_About") AdlibRegister("CalcFPS", 1000) Local $fScale, $fTmp, $iStep = 2 ;the higher $iStep is the faster the animation & lower the quality. Do ;~ DllCall($__g_hGDIPDll, "int", "GdipFillRectangle", "handle", $hCanvas, "handle", $hBrush_Clr, "float", 0, "float", 0, _ ;~ "float", $iW, "float", $iH) ;erase canvas background ;~ _WinAPI_BitBlt($hDC_backbuffer, 0, 0, $iW, $iH, $hDC_backbuffer, 0, 0, $BLACKNESS) _GDIPlus_GraphicsDrawImageRect($hCanvas, $hImage_Galaxy, 0, 0, $iW, $iH) DllCall($__g_hGDIPDll, "int", "GdipTranslateTextureTransform", "ptr", $hTexture_Earth, "float", 0.75, "float", 0, "long", 0) For $i = 1 To $iDiameter2 Step $iStep $fScale = 1 + $i / $iDiameter2 _GDIPlus_MatrixSetElements($hMatrix, 1, 0, 0, 1, 0, 0) _GDIPlus_MatrixTranslate($hMatrix, $fDX + $iDiameter2, $fDY + $iDiameter2) _GDIPlus_MatrixScale($hMatrix, $fScale, $fScale) _GDIPlus_MatrixTranslate($hMatrix, -$iDiameter2, -$iDiameter2) _GDIPlus_GraphicsSetTransform($hCanvas, $hMatrix) DllCall($__g_hGDIPDll, "int", "GdipFillEllipse", "handle", $hCanvas, "handle", $hTexture_Earth, _ "float", $i, "float", $i, "float", $iDiameter - $i * 2, "float", $iDiameter - $i * 2) Next _GDIPlus_MatrixSetElements($hMatrix, 1, 0, 0, 1, 0, 0) _GDIPlus_GraphicsSetTransform($hCanvas, $hMatrix) _GDIPlus_GraphicsFillRect($hCanvas, $fDX, $fDY, $iDiameter, $iDiameter, $hBrush) _GDIPlus_GraphicsDrawStringEx($hCanvas, "FPS: " & $iShowFPS, $hFont_FPS, $tLayout_FPS, $hFormat_FPS, $hBrush_FPS) ;draw background message text _WinAPI_BitBlt($hDC, 0, 0, $iW, $iH, $hDC_backbuffer, 0, 0, $SRCCOPY) ;blit drawn bitmap to GUI $iFPS += 1 If $bExit Then ExitLoop Until Not Sleep(10) AdlibUnRegister("CalcFPS") ;release resources _GDIPlus_BrushDispose($hBrush) _GDIPlus_PathDispose($hPath) _GDIPlus_MatrixDispose($hMatrix) _GDIPlus_ImageDispose($hImage_Earth) _GDIPlus_ImageDispose($hImage_Galaxy) _GDIPlus_BrushDispose($hTexture_Earth) _GDIPlus_FontDispose($hFont_FPS) _GDIPlus_FontFamilyDispose($hFamily_FPS) _GDIPlus_StringFormatDispose($hFormat_FPS) _GDIPlus_BrushDispose($hBrush_Clr) _GDIPlus_BrushDispose($hBrush_FPS) _GDIPlus_GraphicsDispose($hCanvas) _WinAPI_SelectObject($hDC_backbuffer, $DC_obj) _WinAPI_DeleteDC($hDC_backbuffer) _WinAPI_DeleteObject($hHBitmap) _WinAPI_ReleaseDC($hGUI, $hDC) GUIDelete($hGUI) EndFunc ;==>GDIPlus_RotatingEarth Func _Exit_About() $bExit = True EndFunc ;==>_Exit_About Func CalcFPS() ;display FPS $iShowFPS = $iFPS $iFPS = 0 EndFunc ;==>CalcFPS ;Code below was generated by: 'File to Base64 String' Code Generator v1.20 Build 2016-12-01 ... Download: Rotating Earth v1.7.au3 In line 92 you can modify the $iStep variable -> the higher $iStep is the faster the animation & lower the quality. So long...
  2. mesale0077 asked me whether I could code some CSS loading animations from different web sites. These are the results using GDI+ (AutoIt v3.3.12.0+ required!): _GDIPlus_MonochromaticBlinker.au3 / _GDIPlus_RotatingBokeh.au3 _GDIPlus_SpinningCandy.au3 / _GDIPlus_SteamPunkLoading.au3 _GDIPlus_IncreasingBalls.au3 / _GDIPlus_PacmanProgressbar.au3 _GDIPlus_StripProgressbar.au3 / _GDIPlus_RingProgressbar.au3 _GDIPlus_LineProgressbar.au3 / _GDIPlus_SimpleLoadingAnim.au3 _GDIPlus_TextFillingWithWater.au3 / _GDIPlus_MultiColorLoader.au3 _GDIPlus_LoadingSpinner.au3 / _GDIPlus_SpinningAndPulsing.au3 _GDIPlus_TogglingSphere.au3 / _GDIPlus_CloudySpiral.au3 _GDIPlus_GlowingText.au3 (thanks to Eukalyptus) / _GDIPlus_HypnoticLoader.au3 _GDIPlus_RotatingRectangles.au3 / _GDIPlus_TRONSpinner.au3 _GDIPlus_RotatingBars.au3 / _GDIPlus_AnotherText.au3 (thanks to Eukalyptus) _GDIPlus_CogWheels.au3 (thanks to Eukalyptus) / _GDIPlus_DrawingText.au3 (thanks to Eukalyptus) _GDIPlus_GearsAnim.au3 / _GDIPlus_LEDAnim.au3 _GDIPlus_LoadingTextAnim.au3 / _GDIPlus_MovingRectangles.au3 _GDIPlus_SpinningAndGlowing.au3 (thanks to Eukalyptus) / _GDIPlus_YetAnotherLoadingAnim.au3 _GDIPlus_AnimatedTypeLoader.au3 / _GDIPlus_Carousel.au3 Each animation function has a built-in example how it can be used. AiO download: GDI+ Animated Wait Loading Screens.7z (previous downloads: 1757) Big thanks to Eukalyptus for providing several examples. Maybe useful for some of you Br, UEZ PS: I don't understand CSS - everything is made out of my mind, so it might be different from original CSS examples
  3. Hello! I've been working on this UDF for some time, but when I read Seeking "kinetic typography" capability in au3 topic, I decided to share it. This UDF brings some functions for creating animations in GDI+ without worrying about rendering or calculating. Features: Adding basic shapes (rectangle, ellipse) and text Animating object properties (like position or size) Animatable transformations (translate, rotate, scale) Double-buffering Rendering to a window or GUI control Enjoy! Motion Graphics UDF
  4. Motion Graphics UDF

    Version 0.0.8

    208 downloads

    Simple UDF for creating animations in GDI+ If you want to see more "experimental" features, go to GitHub.
  5. 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"!
  6. Here a version of a splash text variant using GDI+. Requires AutoIt v3.3.12.0 or higher! Source code download: UDF: _SplashTextEx.au3 (previous downloads: 135) Example: Example1.au3 (previous downloads: 127) Might be useful for someone... Please report any bugs.
  7. I have an edit box that I wanted to keep tabs of the line number in real-time. For an example, if a user enter 3 lines, the counter should update as soon as the user hit "Enter" after the 3rd entry. I managed to do it but it's not real-time. Program would hung or slow to response after I hit the "Configuration" button. Many thanks! ; Testing Host Count #include <GUIConstantsEx.au3> #include <GuiEdit.au3> #include <StaticConstants.au3> Example() Func Example() Local $hostLabel, $hostEdit, $button, $msg, $count, $hostname GUICreate("Host Count") ; will create a dialog box that when displayed is centered $hostLabel = GUICtrlCreateLabel ("Hostname", 10, 10, 120, 20) $hostEdit = GUICtrlCreateEdit ("", 10, 40, 200, 80) $button = GUICtrlCreateButton ("Configure", 20, 140, 120, 30) GUISetState() ; will display an dialog box with 1 checkbox ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() $hostname = StringRegExp (GUICtrlRead ($hostEdit), '\V\S+', 3) $count = UBound ($hostname) sleep (500) GUICtrlCreateLabel ($count, 200, 10, 10, 20, $SS_RIGHT) Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $button MsgBox (0, "Count", "The count is " & $count) #cs $hostname = StringRegExp (GUICtrlRead ($hostEdit), '\V\S+', 3) $count = UBound ($hostname) GUICtrlCreateLabel ($count, 200, 10, 10, 20, $SS_RIGHT) #ce EndSelect WEnd EndFunc ;==>Example
  8. Function Reference _GUIResourcePic.au3 Functions related to the image control in the GUI. Sintax: _GUICtrlPic_Create( FileName, Left, Top [, Width [, Height [, Style [, ExStyle ]]]]]] ) _GUICtrlPic_SetImage( controlID, FileName [, FixSize ]]) _GUICtrlPic_Delete( controlID ) _GUICtrlPic_Release( controlID ) _GUICtrlPic_SetState( controlID, state ) _GUICtrlPic_GetInfo( FileName or Control ID ) Supports: ; Images in the format: .bmp, .jpg, .png, .gif {animated} and other formats of files for resources (.exe, .dll, .ocx, .cpl...). ; For the "resources", use the "FileName" in this format: "MyFile.ext|RessourceName|ResourceType". ; It can be a URL path as well! Download: Version: 1.8.2012.2600b _GUIResourcePic_(RedirectLink).html 17.0k (Previous downloads: 140) Example_Include_HD_GIF_(RedirectLink).html 36.08k (Previous downloads: 135) Note: Added new function! I've made significant changes in the code, including the syntax of some functions! Now uses GDI+ to render the images. Example of use is included! Sample: CPU in 0,60%. http://www.youtube.com/watch?v=NZZB-G9C1Kg Direct download: _GUIResourcePic.mp4 Fixes: $GUI_GIFSTART ; If image is GIF animated, start/resume animation! $GUI_GIFSTOP ; If image is GIF animated, stop/pause animation! ;----> Style (GIS = Gif Image Styles) $GIS_ASPECTRATIOFIX ; Fix the image size based on aspect ratio. $GIS_HALFTRANSPARENCY ; The images are rendered with the window background color. This Style is default. $GIS_FULLTRANSPARENCY ; The frames are rendered in full transparency independent of the background color of the window! Note: This Style consumes more CPU because the exstyle $WS_EX_TRANSPARENT is added to each frame in real time! Not valid if the image does not have transparency! ;----> Default Style to _GUICtrlPic_Create()! $GIS_SS_DEFAULT_PIC = BitOR($GIS_HALFTRANSPARENCY, $SS_NOTIFY) ;----> ExStyle (GIS_EX = Gif Image Extended Styles) $GIS_EX_DEFAULTRENDER ; To use _GUIImageList_Draw in rendering of images, use less CPU. This ExStyle is default! $GIS_EX_CTRLSNDRENDER ; The frames is render using GUICtrlSendMsg, but consumes much more CPU!!! Note: If you use this ExStyle, only $GRP_FULLTRANSPARENCY is used for rendering images! 1.02b 09/05/2012 -> After updating the code, the images with transparency were not being shown as they should, changed code again!09/05/2012 -> Fixes in the _GUICtrlPic_SetImage() function, the measures were not being updated according to the parameter FixSiz , identified by @Belini, thank you!Regards, João Carlos.
  9. Is it possible to resize a window without jsut making it bigger, but make the sides moving outwards / inwards to resize the window.
  10. Entertainment The idea was to adapt the eagle.au3 example posted by mesale0077 making the bird fly across the monitor. This is the result: eagle fly GreenCan.au3 But, I was not really happy with the result, so I thought, maybe use the original animated gif and move it across the monitor using a transparent GUI. This is a script based on an example of trancexx' GIFAnimation udf. GIFAnimation.au3 is required for below example and can be found here: GIFAnimation.au3 I think the result is much better than the perforated GUI. The script is a kind of a screen saver, or at least a distractor for the eye. FlyingBird.au3 (bug fixed by Mesale0077) flying_bird.ico New examples: Crawling Frog: CrawlingFrog.au3 frog3.ico Cheetah and Tiger: see Post #13 for the more information Version 1.0.0.1 Small bugfix to avoid the current active GUI to flip to the background. Only For those who already tested version 1.0.0.0: same fix for the child script Don't start it but replace the old on in @TempDir & "GIFS" by this new version If you run the script, no big issue but you will have to process kill it... Cheetah and Tiger (Most recent example 1.0.1.0) CheetahRun.au3 _TigerWalk.au3 This example is not only moving animals around your screen but you can capture (stop) these animals by clicking with your left mouse button on it. You can drag and drop the animals around the screen before it pauses. Two scripts are still required. One for the Cheetah and one for the Tiger. Both scripts communicate with each other via memory pointers (Nomad's functions) Remember to download trancexx' GIFAnimation.au3 (see link above) Compiling: You can run the client script (or both scripts) compiled but change the setting $b_TigerWalk_au3 to False Also be aware that you can run the compiled script only in 32bit mode, it will work fine on a x64 system though. Both scripts should be in the same folder There are only 2 pointers that the apps share, one for holding each other and one to stop pausing randomly (animals will run continuously, change the $bNoPause setting in CheetahRun.au3, it should be to False but I left it to True for the sake of the demo. I modified some images, so if you ran the past demos, please first empty your temp folder with following script. #cs ---------------------------------------------------------------------------- Author: GreenCan Script Function: Cleanup temporary folder for CheetahRun #ce ---------------------------------------------------------------------------- Global $sTempFolder = @TempDir & "\GIFS" DirRemove($sTempFolder, 1) Let me know if you find any bug, I exhaustively tested both scripts but as it is rather complex to debug, you never know... GreenCan