Is there a _GETALPHA kind of method? - Printable Version +- QB64 Phoenix Edition (https://qb64phoenix.com/forum) +-- Forum: QB64 Rising (https://qb64phoenix.com/forum/forumdisplay.php?fid=1) +--- Forum: Code and Stuff (https://qb64phoenix.com/forum/forumdisplay.php?fid=3) +---- Forum: Help Me! (https://qb64phoenix.com/forum/forumdisplay.php?fid=10) +---- Thread: Is there a _GETALPHA kind of method? (/showthread.php?tid=2999) |
Is there a _GETALPHA kind of method? - Dav - 09-01-2024 I am adding alpha transparency parameter to a SUB using _SETALPHA to change the image, was wondering if there is a way to retrieve current alpha state of that image before I change it, so I can restore it what it was before after calling the SUB. Thanks! - Dav RE: Is there a _GETALPHA kind of method? - SMcNeill - 09-01-2024 _ALPHA32(POINT(x,y)) Note that alpha is stored via pixel and not the whole image. (Or just _ALPHA, if it's not a 32-bit screen.) RE: Is there a _GETALPHA kind of method? - Dav - 09-01-2024 Oh cool. That was quick, and is easy. Thanks! - Dav RE: Is there a _GETALPHA kind of method? - Dav - 09-02-2024 Yes, that works very well, Steve! I'm playing around with the original RotoZoom, adding some things, and setting the alpha of the image is one. _SETALPHA calls slows down the SUB, but I would like that option for what I'm using it for. This also has zoom factor apart from the xscale/yscale factor. In the program you can see the original image alpha being drawn by _PUTIMAGE at the bottom right was restored correctly by the SUB after using it. EDIT: On second thought, maybe it would just be better to _COPYIMAGE a temp one to use and forget abut having to restore it. Well, at least I know how to do that now. - Dav Code: (Select All)
|