Igor How the community can help you? May be gary, alain, fernando can give a hand there. Because if this would be fixed we would already have a much nicer system. Stef
Nice work Igor!
I believe that Paragraph has too much responsibility right now, for example it takes care of drawing itself, besides the composition of lines to a fit a certain extent. For example,
(VIEW) Paragraph>>showCaret: (MODEL) Paragraph>>compose: t style: ts from: startingIndex in: textContainer
Looks like some of the behavior should be moved to the TextMorph.
yes. we need to review the code. and make it more flexible (and polymorphic).
Fernando
On Tue, Nov 22, 2011 at 3:25 PM, Igor Stasenko <siguctua@gmail.com> wrote:
On 22 November 2011 13:55, Tudor Girba <tudor@tudorgirba.com> wrote:
Is there a way to load these?
Yes. on SqS/Athens i just uploaded last snapshot. but be warned, there's a lot of trash and cruft, which i will clean up eventually :)
Doru
On Tue, Nov 22, 2011 at 1:40 PM, Alexandre Bergel <alexandre.bergel@me.com> wrote:
Stephane, asked me to show this :)
Gorgeous! Go go go Igor!
Alexandre
Nothing fancy there, just a same window, rendered with different scale. The code which doing this, is following:
testWindowRender | surf | surf := AthensBalloonSurface new form: (Form extent: Display extent depth: 32).
surf drawDuring: [ :canvas |
canvas pathTransform scaleBy: 0.5. " or 2 " canvas fullDrawMorph: self testWindow.
].
Display getCanvas translucentImage: surf form at: 0@0
There are problems of course: - i have to use different Paragraph class, and therefore i have to use different TextMorph subclass, because otherwise it will use hardcoded Paragraph class.
The paragraph model is a bit messy. It doesn't clear to me, what role it has. I thinking that it is a cached state for Text, to draw it on screen. But apparently it is more than a cache , and there are couple things which simply don't fit with it. I am thinking about doing some overhaul with TextMorph/Paragraph later, to clean up unused stuff (believe me there's a lot of it), and to make clear separation of roles.
In fact, this stuff could live by itself. You can render text without using paragraph(s) mess. But i want to integrate that with Morphic, so we can switch to Athens at some point. That's why i need to deal with this. :)
-- Best regards, Igor Stasenko. <Screen shot 2011-11-22 at 11.43.32 AM.png><Screen shot 2011-11-22 at 11.44.07 AM.png>
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
-- www.tudorgirba.com "Every thing has its own flow"
-- Best regards, Igor Stasenko.
-- Best regards, Igor Stasenko.