[Vm-dev] [OpenSmalltalk/opensmalltalk-vm] BitBlt rule blendAlphaScaled may not be correct (Issue #643)

MariusDoe notifications at github.com
Fri Jul 1 09:34:34 UTC 2022


> > The described behavior doesn't occur when blending two 32 bit Forms.
> 
> Would you elaborate on your scenario? How do those lower-depth forms come to be these days?

We use `Pen`, which is a subclass of `BitBlt`. More specifically, we use `Pen>>roundNib:` among others to create a circular brush for painting on a `Form`. This method creates a `Form` with depth `1`. One can then set the color of the brush with `Pen>>color:`, which calls `BitBlt>>fillColor:` which in turn sets its `halftoneForm`. According to the class comment of `BitBlt`, the pixel values of the `halftoneForm` are ANDed with the `sourceForm` pixels before the blending rule is applied.

A workaround for us might be to use Pens with 32 bit sourceForms, if that is possible. I only noticed the different behavior of 32 bit forms while trying to create a code snippet to reproduce the problem, so I haven't tried this workaround yet. Also, I think that the problem still occurs when using alpha values between `1` and `254`, even if those might not be as noticeable.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/643#issuecomment-1172146148
You are receiving this because you are subscribed to this thread.

Message ID: <OpenSmalltalk/opensmalltalk-vm/issues/643/1172146148 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20220701/7835cdbc/attachment-0001.html>


More information about the Vm-dev mailing list