Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ Miniwindows ➜ Alpha transparency - or possibly faking it?

Alpha transparency - or possibly faking it?

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Worstje   Netherlands  (899 posts)  Bio
Date Wed 03 Sep 2008 09:25 AM (UTC)
Message
I ran into a few things I wanted to do just now, but alpha transparency isn't possible with mini windows. Seeing how I can't fake the problem with a fancy loop over the miniwindows or a clever pre-prepared image, I'd like to request either (or both) of the following:

1a) Add flag 8 to WindowCreate, which essentially adds processing of the alphamask (fourth channel next to r, g and b) when drawing the miniwindow to final output.

1b) Make WindowImageFromWindow("mywindow", "text", "") possible. When SourceWindow is empty, it would get the visible TextRectangle, plus any backgrounds. This would make it possible to affect the text with the various blending operations. Also, a GetBackgroundAtRectangle() or something so I could blend the two together. I'd calculate what the background would look like there, but with all the different modi that is nearly impossible.

Likewise, if you want to affect the text while blending and such, it would be annoying if the miniwindows themselves got in the way of selecting, clicking etc. As such I'd also like to suggest

2) a flag 16 for WindowCreate - passive. It would essentially behave like it was underneath all other text+miniwindows, except be drawn in front of the text.


The idea is that this will make it possible to allow the text to fade out as it hits the top of the scrolling area, while I could still click and select it without problems where I might hit invisible miniwindow edges otherwise.


I am open for other ideas on how to implement this fading thing, but this is the only way I can imagine so far - none of the current functions seem to give me the information/control I need to pull it off. Maybe I am missing something? :D
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #1 on Wed 03 Sep 2008 09:40 AM (UTC)
Message
http://www.gammon.com.au/scripts/doc.php?function=WindowMergeImageAlpha

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Worstje   Netherlands  (899 posts)  Bio
Date Reply #2 on Wed 03 Sep 2008 10:46 AM (UTC)
Message
Ah, I hadn't seen that one. Still - how would one go about affecting the actual mud output and fade that out? For as far I understand that function, it only operates on miniwindows and existing contents. But a miniwindow can at most have one transparent color, so I'm not sure how this would help fading the actual text out.
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #3 on Thu 04 Sep 2008 10:26 PM (UTC)
Message
You want to have a miniwindow at the top, which the text gradually fades as it hits it, but you can still select the text (and not the miniwindow), is that it?

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Worstje   Netherlands  (899 posts)  Bio
Date Reply #4 on Fri 05 Sep 2008 12:26 AM (UTC)
Message
Yes. I've been trying to find a link showing the kind of effect I want to achieve, but somehow you can't ever find webpages with such effects when you want to find them. :) If I find such a link, I'll post it still.

I know you mentioned in the past that you do not want to make miniwindows drawable with an alphamask due to the speed-penalty this would give. However, making draw_alpha another flag (like the transparent or draw-beneath ones) in the WindowCreate would simply allow the BitBlt() call to be replaced by whatever call would base itself on an alpha channel (or external mask), only giving the penalty for windows that have that flag on.
Top

Posted by Worstje   Netherlands  (899 posts)  Bio
Date Reply #5 on Sat 06 Sep 2008 04:28 AM (UTC)
Message
Finally found some links with what I want to code but can't. It's all a matter of finding the right combination of words, bah.

http://flashden.net/item/easing-scroll-with-gradient-fade/5131 discusses precisely this, but how it should be made in flash. Notice how the text fades near the top and bottom.

http://www.cssplay.co.uk/menu/fade_scroll has another example, except done in css. The latter kind of describes the way I was thinking of handling it, although I'm hoping to also take the background into account.

Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


18,268 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.