I am able to draw morphic primitives with the alpha channel working properly by overriding #drawOn: in my subclass. I am not able to make it work for an ImageMorph.<br><br>I'm running squeak 3.9-7067 on XP.<br><br> Thanks again,
<br> Steve<br><br><br><br><div><span class="gmail_quote">On 4/23/07, <b class="gmail_sendername">Bert Freudenberg</b> <<a href="mailto:email@example.com">firstname.lastname@example.org</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Try drawing something other than an image. I have a hunch the alpha-<br>bitblt is wrong ...<br><br>Btw, which platform are you on? Which VM?<br><br>- Bert -<br><br>On Apr 23, 2007, at 9:32 , Steven Greenberg wrote:<br><br>
> Following Bert's advice, I see that HaloMorph overrides<br>> #drawSubmorphsOn: and calls its Canvas using<br>> asAlphaBlendingCanvas. That seems like a good place to start.<br>><br>> I tried subclassing ImageMorph and adding this method:
<br>><br>> drawOn: aCanvas<br>> ^ super drawOn: (aCanvas asAlphaBlendingCanvas: alphaValue).<br>><br>> Unfortunately, it didn't display anything at all. I tried alpha<br>> values of 0.5 and
1.0. If I remove the alpha blending stuff, and<br>> simply call:<br>><br>> ^ super drawOn: aCanvas.<br>><br>> it works like a normal ImageMorph, so at least I know it isn't<br>> broken someplace else.
<br>><br>> Any suggestions on how to get asAlphaBlendingCanvas to blend some<br>> alphas?<br>><br>><br>><br>><br>> On 4/23/07, Steven Greenberg <<a href="mailto:email@example.com">firstname.lastname@example.org
</a>> wrote:<br>> Thanks for the pointer! I didn't try that code in the workspace,<br>> but if you enable "haloTransitions" using the Preferences browser<br>> then the halos fade in and out.<br>
><br>> Thanks,<br>> Steve<br>><br>><br>><br>><br>> On 4/22/07, Bert Freudenberg <<a href="mailto:email@example.com">firstname.lastname@example.org</a> > wrote:<br>> On Apr 23, 2007, at 0:44 , Steven Greenberg wrote:
<br>><br>> > I have a PNG image that I'd like to display fading out. I tried<br>> > the BitBlt method suggested by "Team RAR" to fade the image, but I<br>> > can't make it work.<br>
> ><br>> > The image loads properly from a file and displays fine as an<br>> > ImageMorph. I have been able to use a TransformationMorph to<br>> > rotate and scale it, and PNG transparency is working properly.
<br>> ><br>> > Is the "Team RAR" BitBlt method the only way, or are there<br>> > alternatives?<br>> ><br>> > I'm running a 3.9 image, and my display depth is set to 32 bits.<br>
> ><br>><br>> Normally you would just use an alpha-blending canvas. See HaloMorph<br>> fadeIn/fadeOut and draw methods. To try those halos, enable this:<br>><br>> Preferences enable: #haloTransitions
<br>><br>> Now when I tried then the halo icons do not actually show until alpha<br>> is one. No idea why that is.<br>><br>> - Bert -<br><br>_______________________________________________<br>Beginners mailing list
<br><a href="mailto:Beginners@lists.squeakfoundation.org">Beginners@lists.squeakfoundation.org</a><br><a href="http://lists.squeakfoundation.org/mailman/listinfo/beginners">http://lists.squeakfoundation.org/mailman/listinfo/beginners