tag:blogger.com,1999:blog-1392831648878588806.post5305310985137513092..comments2022-04-27T19:46:55.651+03:00Comments on The Itinerant Developer: Transparent graphics with pure GDI (Part 1 1/2)Davehttp://www.blogger.com/profile/05039004653244724673noreply@blogger.comBlogger7125tag:blogger.com,1999:blog-1392831648878588806.post-49985059642542454942011-11-10T14:02:22.728+02:002011-11-10T14:02:22.728+02:00Dave, I don't want to oblige you into anything...Dave, I don't want to oblige you into anything. I posted my code just in case anybody (including you :-)) might be interested.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1392831648878588806.post-7267692167921413702011-11-10T13:08:50.173+02:002011-11-10T13:08:50.173+02:00Ulrich: Hmm, I'll do some experiments. Might ...Ulrich: Hmm, I'll do some experiments. Might take a few days, but...Davehttps://www.blogger.com/profile/05039004653244724673noreply@blogger.comtag:blogger.com,1999:blog-1392831648878588806.post-4804580297807925502011-11-08T18:35:41.215+02:002011-11-08T18:35:41.215+02:00great! can't wait for part 2.
Thanks a lot for...great! can't wait for part 2.<br />Thanks a lot for the good work.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1392831648878588806.post-25536511479214191212011-11-08T18:06:23.541+02:002011-11-08T18:06:23.541+02:00Once again, but hopefully readable: http://pastebi...Once again, but hopefully readable: http://pastebin.com/TUKCPEQf<br /><br />Dave, feel free to merge my last to comments.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1392831648878588806.post-88591558713216810412011-11-08T15:04:34.574+02:002011-11-08T15:04:34.574+02:00Yes, 1x1 for everything. I'll try to attach my...Yes, 1x1 for everything. I'll try to attach my code for dissection ;-) :<br /><br />procedure NormalizeRect(var r: TRect);<br />var<br /> t: Integer;<br />begin<br /> if r.Left > r.Right then<br /> begin<br /> t := r.Right;<br /> r.Right := r.Left;<br /> r.Left := t;<br /> end;<br /> if r.Top > r.Bottom then<br /> begin<br /> t := r.Bottom;<br /> r.Bottom := r.Top;<Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1392831648878588806.post-43223359885309284162011-11-08T14:54:05.887+02:002011-11-08T14:54:05.887+02:00Hi Uli,
Cool! I remember you saying you moved to ...Hi Uli,<br /><br />Cool! I remember you saying you moved to a 1x1 bitmap, and it's interesting to hear you tried clipping and that it's fast. Are you using a 1x1 bitmap for (b) too? That would probably be the fastest of all.<br /><br />Approach 1 is actually not very sluggish in our software, although you do see the CPU meter spike, and I think it's because of the premultiplication Davehttps://www.blogger.com/profile/05039004653244724673noreply@blogger.comtag:blogger.com,1999:blog-1392831648878588806.post-28289918908832123602011-11-08T14:40:20.643+02:002011-11-08T14:40:20.643+02:00Dave,
thanks for the update. Originally our softw...Dave,<br /><br />thanks for the update. Originally our software used approach 1 and it was reaaaaaly sluggish. Your previous article inspired me to (a) use a 1x1 pixel bitmap in the rectangular case and (b) combine rectangular alphablending + clipping for the non-rectangular case, so by now we're using approach 2 and it's **considerably** faster - no need to measure that. :-)<br /><br />Anonymousnoreply@blogger.com