[Cuis-dev] TextComposition rendering

Juan Vuletich JuanVuletich at zoho.com
Fri Mar 25 07:34:33 PDT 2022


Hi Hilaire,

Please post enough detail (or a pre-saved image) so I can easily 
reproduce the problem and debug it.

Thanks,
On 3/25/2022 8:12 AM, Hilaire Fernandes via Cuis-dev wrote:
>
> 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


-- 
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
https://independent.academia.edu/JuanVuletich
https://www.researchgate.net/profile/Juan-Vuletich
https://patents.justia.com/inventor/juan-manuel-vuletich
https://twitter.com/JuanVuletich

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20220325/4051f4e8/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 14184 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20220325/4051f4e8/attachment-0001.png>


More information about the Cuis-dev mailing list