| Main > Software Forum |
| Reflection + Gradual Alphablending on a Layout |
| << < (7/8) > >> |
| headkaze:
hehe but seriously, you can't write a plugin to do this, swindus will need to think it's worth adding to the Mala FE. Personally I think using the method proposed by me would work great with Mala. In fact it would work for Atomic or GameEx as well. The thing is, what you failed to metion Youki is that you can get a handle to the dc of surfaces in Direct Draw. So you can actually BiBlt to them or whatever use AlphaBlend API. It would probably be faster than doing per bit alpha bending like you've done. You might want to include that as a feature for slower machines. |
| youki:
In fact not. It is one of the first thing i tried 3 years ago before starting to write my own routines. I mean it doesn't work in the context of Atomic with some guide line i wanted for Atomic. I wanted to Atomic works on 16bit colors depth not 24 or 32. Just to save "memory" . Remind that i wanted Atomic works on a very wide range of configuration (slow, average, fast...) . And i planned to do advanced animated layout that could require lot of images in memory... Alphablend function with 16bit image does not manage "Transparent" color. you can only set the same transparency on all points of the image. But not say, the RGB(255,0,255) is not visible for the entire image. And AlphaBlend function does not manage Gradual Transparency on 16 bit image. If you want to that, you have to use 32bit/pixel images. In addition the fact to use 32bit/pixel image with Alphachanel in a layout would require that the user who is making the layout knows this concept and knows how to work with Photoshop to do what he wants. That's require some graphics skill that not everybody have. I wanted something as simple as possible when you build the layout. Atomic use simple image, and you can apply AlphaBlending (gradual or not) on every images, you don't need to play with AlphaChannel or so... So mainly due to this 3 points , i decided to go to my own routines. Now, in the context of another Front End , of course it should work. --- Quote ---you can't write a plugin to do this, --- End quote --- It depends only how your plugin system is done. Technically it is perfectly doable from a plugin. Swindus would have to enhance his current plugins system , i think. |
| headkaze:
No but your wrong, I'm talking about using AlphaBlend function in a loop, so you use for example divide the height up into 10 peices then AlphaBlend them one by one using different levels. It is still faster than using per pixel alpha blending. The "gradual transperancy" you descripe is accomplished in the loop, in chunks, not per pixel like you do. |
| youki:
So you are saying is i want alpha blend 64000 pixels with no contigous alpha value , i call 64000 times AlphaBlend?? Even if you try to optimise by finding "contigous" values and Alphablending little zones , that you could win using the alphablend you will lost by finding the chunks where you will have anyway to go pixel by pixel. Or may be i don't get your point ? Anyway i'm pretty sure that 64000 call to a Alphablend function is slower than changing 640000 WORD directly in memory on the back buffer. |
| headkaze:
No, I'm saying use AlphaBlend in chuncks, not pixel by pixel. --- Code: ---StretchBlt(hMemDC, 0, 0, width, height, hDCSrc, 0, height - 1, width, -height, SRCCOPY); for(int i=0; i<levels; i++) AlphaBlend(hDCDest, left, top + height + i * Size, width, size, hMemDC, 0, i * Size, width, size, fcn, 0); --- End code --- |
| Navigation |
| Message Index |
| Next page |
| Previous page |