[squeak-dev] Rendering a text along an arc
karlramberg at gmail.com
Sun Dec 30 22:06:15 UTC 2018
TextMorph>>createParagraph is the method that broke the TextOnCurve
It need a guard against applying wrapFlag.
There is also some bug with the bounds so the text will not redraw properly.
Something like this under will prevent the DNU but it will not fix the
issue with the text bounds.
self setProperty: #CreatingParagraph toValue: true.
"...Code here to recreate the paragraph..."
paragraph := (self paragraphClass new textOwner: self owner).
paragraph wantsColumnBreaks: successor notNil.
style: textStyle copy
from: self startingIndex
in: self container.
(paragraph isKindOf: TextOnCurve)
ifTrue:[ self removeProperty: #CreatingParagraph.
["Was given huge container at first... now adjust"
paragraph focused: (self currentHand keyboardFocus == self).
] ensure: [self removeProperty: #CreatingParagraph].
On Sun, Dec 30, 2018 at 3:56 PM karl ramberg <karlramberg at gmail.com> wrote:
> Broke between #16520 and update: #18028
> On Sun, Dec 30, 2018 at 3:20 PM karl ramberg <karlramberg at gmail.com>
>> I just tested this in a 2.5 image and it worked :-)
>> I'm not sure when it broke...
>> On Sun, Dec 30, 2018 at 9:36 AM karl ramberg <karlramberg at gmail.com>
>>> You can pull out a Line from the Graphics category in the ObjectsTool.
>>> Then enable 'drop in' in the Lines menu.
>>> Then pull out Text from the Basic category.
>>> In Texts menu you can then select 'follow owner's curve'
>>> Unfortunately it it broken. I think because NewParagraph uses another
>>> notion of container than what is expected.
>>> On Sun, Dec 30, 2018 at 2:06 AM Eliot Miranda <eliot.miranda at gmail.com>
>>>> anyone have any code to display text in a nice font along an arc or
>>>> a spiral?
>>>> best, Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Squeak-dev