Jump to content

Masking + Prospeed?


Recommended Posts

Posted Image

Posted Image

hehe BubbleBreaker is a great example but a little complexed for me not sure what is and isn't required a quick example would be great, I am wondering with this can I make like a progress bar that goes one color and then another by masking it at different widths and heights?

like it will be transparent and as I lower the masking the progress goes up more.

Edited by JellyFish666
Link to comment
Share on other sites

Otherwise, can't you use the GUICtrlCreateProgress?

If you're after creating a "stylish" looking progress bar, the only way I can see to do it(as the animation of GUICtrlCreateAvi can't be controlled more than playing or stopping the animation), is to have a set of pictures, representing the frames in an animation, creating all the frames at the same place, and then show each frame(hiding the previous, etc.) to create an animated effect..

Link to comment
Share on other sites

mmh, mybe this ?

i repainted your png with transperence color

#include <Prospeed.au3>
Opt("GUIOnEventMode", 1)
HotKeySet("{Esc}", "_exit")

$GUI = GUICreate("ProgressBar ColorChange", 400, 600, -1, -1)
GUISetOnEvent(-3, "_exit")
GUISetState()

background("",0,0,400,600)

$load = LoadExtImage("thermometrmm7.jpg")
$mask = ImportPng(0,"thermometrsv2.png")

For $i = 0 To 445 Step 1
    $bitmap = CreateExtBmp(32, 480)
    CopyExtBmp($bitmap, 0, 450-$i, 32, 480, $load, 0, 450-$i, 0)
    PaintPng(0,$bitmap,0,0,$mask,0)
    CopyExtBmp($hdc, 100, 50, 32, 480, $bitmap, 0, 0, 0)
    FreeExtBmp($bitmap)
    Sleep(10)
Next

While 1
    Sleep(1000)
WEnd

Func _exit()
    FreeAllExtBmps()
    FreePng(0, $mask)
    Exit
EndFunc

post-5777-1207857702_thumb.png

Link to comment
Share on other sites

one with color change ;

#include <Prospeed.au3>
Opt("GUIOnEventMode", 1)
HotKeySet("{Esc}", "_exit")

$GUI = GUICreate("ProgressBar ColorChange", 400, 600, -1, -1)
GUISetOnEvent(-3, "_exit")
GUISetState()

background("",0,0,400,600)

$load = LoadExtImage("thermometrmm7.jpg")
$mask = ImportPng(0,"thermometrsv2.png")

$array = InitExtFX($load)

For $i = 0 To 445 Step 1
    $clone = CloneArray($array)
    ExchangeRgb($load,0,0,$clone,-$i/3,$i/3,0)
    $bitmap = CreateExtBmp(32, 480)
    CopyExtBmp($bitmap, 0, 450-$i, 32, 480, $load, 0, 450-$i, 0)
    PaintPng(0,$bitmap,0,0,$mask,0)
    CopyExtBmp($hdc, 100, 50, 32, 480, $bitmap, 0, 0, 0)
    FreeExtFX($clone)
    FreeExtBmp($bitmap)
    Sleep(10)
Next

While 1
    Sleep(1000)
WEnd

Func _exit()
    FreeAllExtBmps()
    FreeExtFX($clone)
    FreeExtFX($array)
    FreePng(0, $mask)
    Exit
EndFunc
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...