Location

WWW

Interests

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

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"!

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.

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