Sign in to follow this  
Followers 0
JellyFish666

Masking + Prospeed?

9 posts in this topic

#1 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites



So... what exactly is it that you're trying to do? :S

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

So... what exactly is it that you're trying to do? :S

making a progress bar out of two images a normal picture and a mask so I can fill how much of the progress bar I want.

Edited by JellyFish666

Share this post


Link to post
Share on other sites

So basically you want to fade the image(s) kinda?

Share this post


Link to post
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..

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

sigh

after many hours I finally found it

[images Deleted]

now is it easy for you guys to understand

Edited by JellyFish666

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Perfect, you got it done exactly how I was hoping it would look like and the color change just wow! thanks for adding that extra little touch to it and I learned a bit more code now that I am trying to absorb.

Share this post


Link to post
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
Sign in to follow this  
Followers 0