[Cuis-dev] Clipping morph

Hilaire Fernandes hilaire at drgeo.eu
Mon Jun 7 10:53:58 PDT 2021


Hi Juan

Le 07/06/2021 à 16:37, Juan Vuletich a écrit :
>>
>> When I set my drawable canvas clipsSubmorphs to true, there is no 
>> drawing appearing.
>>
>
> I guess you mean your morph. #ClipsSubmorphs is implemented by morphs, 
> not by the canvas.

In fact it is a WidgetMorph.

>
>> I took a look at:
>>
>> MorphicCanvas>>clippingByCurrentMorphDo: aBlock
>>
>>   * my drawable answers true to clipsSubmorphsReally
>>
>
> You should not redefine this method. Your morph should only define 
> #clipsSubmorphs.

I did not.


> 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?


In short, I have a LayoutMorph into which I add my drawable, a widget 
morph, then the geometric items are added to this drawable.

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.

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.

I added (requiresVectorCanvas    ^ true) to my drawable, clippings works 
! But it is obviously super slow.

So likely time to test your plugin.

Thanks

-- 
GNU Dr. Geo
http://drgeo.eu
http://blog.drgeo.eu

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20210607/f9f7bc7d/attachment.htm>


More information about the Cuis-dev mailing list