[Cuis-dev] Desktop background, Morphic and SVG examples, and other tweaks

Juan Vuletich juan at jvuletich.org
Fri Sep 17 10:32:47 PDT 2021


Hi Folks,

In the recent days, I've been pushing to GitHub many updates, mostly 
related to Morphic.

I've been working hard on improving stability and reducing VM crashes, 
especially when using VectorGraphics. This meant changing the sequence 
in which the Display and other very big aux arrays are created. Today I 
found that the Cuis Morphic background is likely a source of trouble. On 
a big Display (4k), each time the main Cuis window is resized, we needed 
to create instances of Bitmap for 56Mb, 48 of them to be released 
immediately. And this could happen several times in sequence, as the 
user resizes Cuis to suit their taste. I've seen VM crashes during 
Garbage Collection while doing this. Besides, on machines with limited 
memory (like BeagleBoard and RasPis), this could give out-of-memory errors.

Today I published a change set that removes the background by default 
replacing with a solid color. After some testing, I couldn't make Cuis 
crash, at least not doing the same things that crashed Cuis almost 
certainly before these changes. Many of you won't care at all, but if 
you preferred the nice background image, I hope you agree that stability 
is more important. If you want to add the image back to your image, all 
that is needed is to transfer the bits in the 'backgroundImageData' in 
the World object to the new image. If you do so, please tell, so we 
don't completely remove the support for backgroundImage in the future.

I also reorganized and rewrote the VectorGraphics examplles. See 
Sample01* to Sample09* morph classes. They are meant to show the kind of 
things Cuis can do, and how little code is needed. The code is intended 
to changed and tweaked at will, to learn and play.

I also reorganized the SVG examples in the SVG repo and package. Amongst 
the things you can do is to evaluate the creation of a SVG example with 
'printIt' in a workspace, and see how you can embed any morph in text.

I hope you enjoy the improved stability in VectorGraphics, and the 
updated examples.

Cheers,

-- 
Juan Vuletich
www.cuis-smalltalk.org
https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev
https://github.com/jvuletich
https://www.linkedin.com/in/juan-vuletich-75611b3
@JuanVuletich



More information about the Cuis-dev mailing list