[Cuis-dev] Clipping operation

Thierry Goubier thierry.goubier at gmail.com
Thu Apr 30 01:28:29 PDT 2020


Hi Hilaire,

in Cuis, Submorph clipping only happens for one submorph, and only if
aMorph>>#clippedSubmorph is true (and that clips to the parent morph, so,
if your wheel morphs are submorphs of your overall frame, then incorrect
clipping for the clipped submorph).

In a case like yours, you will probably need to add a morph that do nothing
but clipping, to ensure that the morph you are drawing in has the exact
same bounds as its parents.

The code in charge of that is MorphicCanvas>>#fullDraw:
The code selecting the clipped submorph is Morph>>#clippedMorph. By
default, it is the last one.

Thierry



Le mer. 29 avr. 2020 à 23:51, Hilaire Fernandes via Cuis-dev <
cuis-dev at lists.cuis.st> a écrit :

> Hi,
>
> When drawing in the canvas (a kind of paste up morph), from the drawOn:
> method, I have drawings not clipped.
>
> See bellow drawings in the title and the bottom of the window. What is the
> proper way to clip the drawings to the bounds of the canvas?
>
> Thanks
>
> Hilaire
>
> --
> GNU Dr. Geohttp://drgeo.eu
>
> --
> Cuis-dev mailing list
> Cuis-dev at lists.cuis.st
> https://lists.cuis.st/mailman/listinfo/cuis-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20200430/fa175c6b/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: unclippedCanvas.jpg
Type: image/jpeg
Size: 38734 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20200430/fa175c6b/attachment-0001.jpg>


More information about the Cuis-dev mailing list