<!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">
On 6/7/2021 2:53 PM, Hilaire Fernandes via Cuis-dev wrote:
<blockquote cite="mid:57be3c67-243e-9276-a3a0-f5353fa41d37@drgeo.eu"
type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<p>Hi Juan<br>
</p>
<div class="moz-cite-prefix">Le 07/06/2021 à 16:37, Juan Vuletich
a écrit :</div>
<blockquote type="cite" cite="mid:60BE2F21.80607@jvuletich.org">
<div class="moz-text-html" lang="x-unicode">
<blockquote
cite="mid:6577666b-1534-a464-dcd7-c34cefff0260@drgeo.eu"
type="cite">
<p><font size="+1">When I set my drawable canvas
clipsSubmorphs to true, there is no drawing appearing.</font></p>
</blockquote>
<br>
I guess you mean your morph. #ClipsSubmorphs is implemented by
morphs, not by the canvas.<br>
</div>
</blockquote>
<p>In fact it is a WidgetMorph.</p>
<blockquote type="cite" cite="mid:60BE2F21.80607@jvuletich.org">
<div class="moz-text-html" lang="x-unicode"> <br>
<blockquote
cite="mid:6577666b-1534-a464-dcd7-c34cefff0260@drgeo.eu"
type="cite">
<p><font size="+1">I took a look at:</font></p>
<p><font size="+1">MorphicCanvas>>clippingByCurrentMorphDo:
aBlock<br>
</font></p>
<ul>
<li><font size="+1">my drawable answers true to
clipsSubmorphsReally</font></li>
</ul>
</blockquote>
<br>
You should not redefine this method. Your morph should only
define #clipsSubmorphs.<br>
</div>
</blockquote>
<p>I did not.</p>
<br>
<blockquote type="cite" cite="mid:60BE2F21.80607@jvuletich.org">
<div class="moz-text-html" lang="x-unicode"> Vector canvas can
clip morphs to the arbitrary shape of the outer morph. But it
has a limitation: In a containment branch, there can be only
one morph that clips submorphs. Do you need more than one
clipping morph? Can you provide an example showing the problem
you see, so I can reproduce it?<br>
</div>
</blockquote>
<p><br>
</p>
<p>In short, I have a LayoutMorph into which I add my drawable, a
widget morph, then the geometric items are added to this
drawable.</p>
<p>I turned the drawable to a MovableMorph, of course the layout
does not work as a MoveableMorph does not have the notion of
extent, but the clipping work.<br>
</p>
<p>So In my context,clipping does not work with a widget morph but
does with a moveable morph, but I can't use that object.<br>
</p>
<p>I added (requiresVectorCanvas ^ true) to my drawable,
clippings works ! But it is obviously super slow.</p>
</blockquote>
<br>
Ok! Now I see the problem! It is a bug, and very easy to fix. Just
delete HybridCanvas>>clipCurrentMorph: . The only implementor
that actually does something is in VectorCanvas, and it will be
called on it when appropriate.<br>
<br>
I'm posting an update to VectorGraphics.pck.st with this change.<br>
<br>
Thanks for reporting. When you find any problem, please help me
fully understand it, so we can improve the framework. Only resort to
a workaround when we are sure we can't find a way to fix the
problem!<br>
<br>
<blockquote cite="mid:57be3c67-243e-9276-a3a0-f5353fa41d37@drgeo.eu"
type="cite">
<p>So likely time to test your plugin.<br>
</p>
</blockquote>
<br>
Of course that would also be great!<br>
<br>
<blockquote cite="mid:57be3c67-243e-9276-a3a0-f5353fa41d37@drgeo.eu"
type="cite">
<p> </p>
<p>Thanks</p>
<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>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://blog.drgeo.eu">http://blog.drgeo.eu</a></pre>
</blockquote>
<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>
</body>
</html>