Re: [Pharo-dev] TxText model
Am 06.04.2016 5:21 nachm. schrieb "Igor Stasenko" <siguctua@gmail.com>:
btw,
if you wanna feel a difference, why we wanted vector based rendering, by
yourself, open:
Morph comment asText asMorph openInSceneView
and then
| sceneView view | sceneView := AthensSceneView new. view := TxAthensLayoutView on: Morph comment asTxModel extent: 400@400.
sceneView scene: view. sceneView openInWindow
and try zooming it in and out with mouse wheel.
I know it's limitation. My point was, that it is not impossible, or depends an the model Text vs. TxModel, alone.
On 6 April 2016 at 17:58, Igor Stasenko <siguctua@gmail.com> wrote:
On 6 April 2016 at 17:07, Nicolai Hess <nicolaihess@gmail.com> wrote:
2016-04-06 10:56 GMT+02:00 Igor Stasenko <siguctua@gmail.com>:
On 6 April 2016 at 11:36, Nicolai Hess <nicolaihess@gmail.com> wrote:
Thanks Igor. Maybe some more Info? (I don't have much experience with this and
don't fully understand what is missing).
1. No support for vector graphics
I know some parts of Athens (with Cairo font renderer and how it is
used in TxText) but at the moment
rendering a TextMorph in Athens works: Morph comment asText asMorph openInSceneView
Sorry, missed to reply to that important point. It works because one good soul spent effort and helped me to finish implementation of a wrapper for Morph, to be able to render any morph into Form, and then render Form on Athens surface.
Nah, actually it works a bit different. Many (Form)Canvas methods are reimplemented on Athens API. But yes, I used some hacks as well.
Didn't knew. Aha.. i see AthensCanvasWrapper. Ohh.. that's so much pain :)
So, that is why it 'works' :)
-- Best regards, Igor Stasenko.
-- Best regards, Igor Stasenko.
-- Best regards, Igor Stasenko.
On 6 April 2016 at 18:34, Nicolai Hess <nicolaihess@gmail.com> wrote:
Am 06.04.2016 5:21 nachm. schrieb "Igor Stasenko" <siguctua@gmail.com>:
btw,
if you wanna feel a difference, why we wanted vector based rendering, by
yourself, open:
Morph comment asText asMorph openInSceneView
and then
| sceneView view | sceneView := AthensSceneView new. view := TxAthensLayoutView on: Morph comment asTxModel extent: 400@400.
sceneView scene: view. sceneView openInWindow
and try zooming it in and out with mouse wheel.
I know it's limitation. My point was, that it is not impossible, or depends an the model Text vs. TxModel, alone.
Of course it doesn't depends on either of those. But it wasn't an answer concerning model, but you question why i had to abandon idea to keep using DisplayScanner & friends. -- Best regards, Igor Stasenko.
2016-04-06 18:00 GMT+02:00 Igor Stasenko <siguctua@gmail.com>:
On 6 April 2016 at 18:34, Nicolai Hess <nicolaihess@gmail.com> wrote:
Am 06.04.2016 5:21 nachm. schrieb "Igor Stasenko" <siguctua@gmail.com>:
btw,
if you wanna feel a difference, why we wanted vector based rendering,
by yourself, open:
Morph comment asText asMorph openInSceneView
and then
| sceneView view | sceneView := AthensSceneView new. view := TxAthensLayoutView on: Morph comment asTxModel extent: 400@400.
sceneView scene: view. sceneView openInWindow
and try zooming it in and out with mouse wheel.
I know it's limitation. My point was, that it is not impossible, or depends an the model Text vs. TxModel, alone.
Of course it doesn't depends on either of those. But it wasn't an answer concerning model, but you question why i had to abandon idea to keep using DisplayScanner & friends.
Sure, but as you talked about limitiations solved by TxText, I thought about limitation for building editor/tools around Text or TxText. I see that you had rendering vector based graphics with TxText and Athens. What I want to see, is a Text-Tool framework for building custom editors or easily add features (code tools or tools for other kinds of text). Rubric comes close, it has some good features for text decorations. Twisty looks promisinig too, I like that it is build on similar classes like TxText but looks more finished. (As it is based on TxText (or a fork) maybe it isn't that difficult to add rendering on athens ?)
-- Best regards, Igor Stasenko.
On 6 April 2016 at 20:31, Nicolai Hess <nicolaihess@gmail.com> wrote:
2016-04-06 18:00 GMT+02:00 Igor Stasenko <siguctua@gmail.com>:
On 6 April 2016 at 18:34, Nicolai Hess <nicolaihess@gmail.com> wrote:
Am 06.04.2016 5:21 nachm. schrieb "Igor Stasenko" <siguctua@gmail.com>:
btw,
if you wanna feel a difference, why we wanted vector based rendering,
by yourself, open:
Morph comment asText asMorph openInSceneView
and then
| sceneView view | sceneView := AthensSceneView new. view := TxAthensLayoutView on: Morph comment asTxModel extent: 400@400.
sceneView scene: view. sceneView openInWindow
and try zooming it in and out with mouse wheel.
I know it's limitation. My point was, that it is not impossible, or depends an the model Text vs. TxModel, alone.
Of course it doesn't depends on either of those. But it wasn't an answer concerning model, but you question why i had to abandon idea to keep using DisplayScanner & friends.
Sure, but as you talked about limitiations solved by TxText, I thought about limitation for building editor/tools around Text or TxText. I see that you had rendering vector based graphics with TxText and Athens. What I want to see, is a Text-Tool framework for building custom editors or easily add features (code tools or tools for other kinds of text). Rubric comes close, it has some good features for text decorations. Twisty looks promisinig too, I like that it is build on similar classes like TxText but looks more finished. (As it is based on TxText (or a fork) maybe it isn't that difficult to add rendering on athens ?)
I payed attention to make things modular. Things like model, layout and view, and then text editor, forming layers and replaceable or close to it. As in snippet of code above, it demonstrates, that you can easily use just layout view, just for text rendering, without paying any attention to higher level things, like text editor, events and UI. Now try doing this with morphic TextMorph. It is far from ideal, and missing a number of features. So, if you see how you can improved - feel free to do it.
-- Best regards, Igor Stasenko.
-- Best regards, Igor Stasenko.
2016-04-06 19:31 GMT+02:00 Nicolai Hess <nicolaihess@gmail.com>:
(As it is based on TxText (or a fork) maybe it isn't that difficult to add rendering on athens ?)
It should be not difficult. In Twisty end rendering on canvas is just 1% of code (or less). I plan to adopt it for Bloc. And for this I will need Athens. And I think Bloc will simplify it a bit. TwyTextMorph implements similar concept of Bloc design which can be used directly.
participants (3)
-
Denis Kudriashov -
Igor Stasenko -
Nicolai Hess