<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Hilaire,<br>
<br>
As you saw, this problem is not related to VectorGraphics. BitBlt
with alpha blending to translucent targets is also broken. For each
pixel, it should divide the r, g, b values of the result by the
alpha. That is exactly what I just fixed in the VectorGraphics
engine. Fixing this in the BitBlt plugin is harder and unlikely,
because it would change the behavior of existing code, perhaps in
unexpected ways. So, the attach. It fixes the result of #imageForm:,
in Smalltalk. It will have a performance impact. Fortunately,
#imageForm: is usually called only to cache stuff, so a bit of
performance loss will not be a problem.<br>
<br>
Please try it.<br>
<br>
Thanks,<br>
<pre class="moz-signature" cols="72">--
Juan Vuletich
<a class="moz-txt-link-abbreviated" href="http://www.cuis-smalltalk.org">www.cuis-smalltalk.org</a>
<a class="moz-txt-link-freetext" href="https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev">https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev</a>
<a class="moz-txt-link-freetext" href="https://github.com/jvuletich">https://github.com/jvuletich</a>
<a class="moz-txt-link-freetext" href="https://www.linkedin.com/in/juan-vuletich-75611b3">https://www.linkedin.com/in/juan-vuletich-75611b3</a>
@JuanVuletich</pre>
<br>
On 5/30/2020 3:06 PM, Hilaire Fernandes via Cuis-dev wrote:
<blockquote cite="mid:75e6986f-4a21-ac48-95a5-4d0dd8010b80@drgeo.eu"
type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<p><font size="+1">Hi Juan,</font></p>
<p><font size="+1">When I ask a form to my circular toolbar morph
with the imageForm: message, the colors are a bit different in
the returned form.<br>
</font></p>
<p><font size="+1">The toolbar is build from chevron morphs. Those
ones cache the vectorgraphic drawing in forms, then the
central part is just a normal circle with alpha (not vector
graphics).</font></p>
<p><font size="+1">See bellow, at the left the morph and the right
the image form. The colors are a bit different:</font></p>
<p><img moz-do-not-send="false"
src="cid:part1.04010108.07040309@jvuletich.org" alt=""
height="381" width="705"></p>
<p><font size="+1"><br>
</font></p>
<p><font size="+1">I think this is the alpha that got it wrong,
see this simple test:<br>
</font></p>
<p>(RectangleLikeMorph new color: (Color orange alpha: 0.5);
imageForm: 32) display <br>
</p>
<p><br>
</p>
<p>Thanks</p>
<p>Hilaire<br>
</p>
<p><br>
</p>
<br>
<div class="moz-cite-prefix">Le 24/05/2020 à 22:55, Juan Vuletich
a écrit :<br>
</div>
<blockquote type="cite" cite="mid:5ECADF5E.2040004@jvuletich.org">
Please try the attaches. SVG now includes #examplesClinton, that
shows another use case for correctly blending to translucent
target.<br>
<br>
This just came out from the oven. Haven't yet reviewed it
carefully. But it seems to work, so please try it.<br>
<br>
Cheers,</blockquote>
<pre class="moz-signature" cols="72">--
GNU Dr. Geo
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://drgeo.eu">http://drgeo.eu</a></pre>
</blockquote>
</body>
</html>