Computer Science Canada Wheres picFadeOut???? |
Author: | Nathan4102 [ Sat Sep 07, 2013 6:27 pm ] |
Post subject: | Wheres picFadeOut???? |
Where the heck is picFadeOut??? I found picFadeIn: Pic.DrawSpecial(Key, 0, 0, picMerge, picFadeIn, 3000) Does picFadeOut simply not exist? I guess I could fade the background back over an image to make it "Fade out", but if the background is more than one image, or includes text and other stuff, it won't work. Any suggestions??? Thanks, Nathan |
Author: | Dreadnought [ Sun Sep 08, 2013 1:39 pm ] | ||||||
Post subject: | Re: Wheres picFadeOut???? | ||||||
It doesn't exist for the same reason that there is no Pic.Erase to go with Pic.Draw. Not only would Turing would have to remember the background at the time of drawing, but there would also be weird things that could happen if you drew over the picture after fading in and before fading out. However, if you are confident that nothing will be drawn over your picture, you can just save the background yourself and fade it back in over top when using picCopy.
You're using picMerge, which means you might run into problems with this approach. Replace the example code with the following to see what I mean.
To get around this we have to do some extra work.
This works for most cases, but adds extra work compared to the first version. If your pictures have a background colour other than white you will have to set it for the FadedPic.bgID as well. PS: Sorry for the huge post... |
Author: | Nathan4102 [ Sun Sep 08, 2013 5:50 pm ] |
Post subject: | RE:Wheres picFadeOut???? |
Wow, didn't think it would be that difficult xD I don't think I'll need to use picMerge, it's just what I've always used as a default. Thanks! |
Author: | Insectoid [ Sun Sep 08, 2013 6:29 pm ] |
Post subject: | RE:Wheres picFadeOut???? |
picCopy should be your default. It just draws the image on screen as-is. To use picMerge, you need to set a transparent color (using Pic.SetTransparentColor), after which all cases of that color are not drawn in your image (useful for eliminating the white box around character images, for example). |
Author: | Nathan4102 [ Sun Sep 08, 2013 6:43 pm ] |
Post subject: | RE:Wheres picFadeOut???? |
Yeah, I used picMerge for like every picture in one of my school projects because I needed to, and now I just always use it for some reason. I definetely should be using picCopy, you're right. |