[Cuis-dev] TextComposition rendering

Hilaire Fernandes hilaire at drgeo.eu
Fri Mar 25 04:12:10 PDT 2022


Hi!

I have this problem that drives me nuts. I have this text object in 
DrGeo, its view is a TextComposition. Whenever I edit it with two lines, 
the second line and the following are not rendered, The view extent is 
correctly computed though.

I fail to see anything wrong. The text is a String, the carriage return 
in the text is byte decimal value 10.

The view is updated as follow:

DrGTextMorph>>contents: aStringOrText     textComposition textComposed 
~= aStringOrText ifTrue: [         textComposition             setModel: 
(TextModel withText: aStringOrText);             composeAll.         
extent _ textComposition usedExtent + 8]

and drawing:

DrGTextMorph>>drawOn: aCanvas     | r |     self contents: mathItem 
text.     r _ self labelPosition extent: extent.     self drawFrame: r 
on: aCanvas.     aCanvas         textComposition: textComposition    
      bounds: (r insetBy: 4)         color: color         
selectionColor: `Color red`.

Any ideas?

Thanks

Hilaire

-- 
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/20220325/4b4b3604/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Capture%20d%E2%80%99%C3%A9cran%20de%202022-03-25%2012-07-24.png
Type: image/png
Size: 14184 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20220325/4b4b3604/attachment.png>


More information about the Cuis-dev mailing list