Re: [Pharo-project] Athens work in progress: couple screenshots
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. 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.
On 22 November 2011 21:23, Fernando Olivero <fernando.olivero@usi.ch> wrote:
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.
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.
On 23 November 2011 09:58, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
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.
It would be great to help adapting all morphs for Athens. Morphs, that having own draw method(s), should also have own #drawOnAthensCanvas: I didn't covered all of them yet, so a little help with it would be nice. Also, it is good for checking the missing functionality in Athens API as well as learning it. There's not much to learn yet :) basicly what you should know is that you have coordinate system: canvas pathTransform (instance of AthensAffineTransform) which you can manipulate to achieve desirable results. And actual drawing: canvas setPaint: somePaintObject. ( color, gradient, or anything which conforms to AthensPaint protocol ). canvas drawShape: (rect or path or anything , which responds to: 'paintFillsUsing: aPaint on: anAthensCanvas' ). canvas draw: (anything , which responds to #drawOnAthensCanvas: ) -- Best regards, Igor Stasenko.
Igor prepare the following: - a class showing an example with the transformation stuff (because it is unclear) - a tester canvas so that people can to (CanvasTester testClass: CircleMorph) open. People could then extend the Athens package with the method in the morph.
It would be great to help adapting all morphs for Athens. Morphs, that having own draw method(s), should also have own #drawOnAthensCanvas:
I didn't covered all of them yet, so a little help with it would be nice. Also, it is good for checking the missing functionality in Athens API as well as learning it.
There's not much to learn yet :)
basicly what you should know is that you have coordinate system:
canvas pathTransform (instance of AthensAffineTransform)
which you can manipulate to achieve desirable results.
And actual drawing:
canvas setPaint: somePaintObject. ( color, gradient, or anything which conforms to AthensPaint protocol ). canvas drawShape: (rect or path or anything , which responds to: 'paintFillsUsing: aPaint on: anAthensCanvas' ). canvas draw: (anything , which responds to #drawOnAthensCanvas: )
think that we are dummies willing to help and do the two things I mention above. I'm then sure you will get contributions. Stef
On 23 November 2011 11:21, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
Igor
prepare the following:     - a class showing an example         with the transformation stuff (because it is unclear)
There is one: AthensBalloonSurfaceExamples
    - a tester canvas so that people can to
(CanvasTester testClass: CircleMorph) open.
err.. what is it? To test morphic display on Athens you can do following: | surf | surf := AthensBalloonSurface new form: (Form extent: Display extent depth: 32). surf drawDuring: [ :canvas | canvas fullDrawMorph: yourMorph. ]. Display getCanvas translucentImage: surf form at: 0@0
People could then extend the Athens package with the method in the morph.
It would be great to help adapting all morphs for Athens. Morphs, that having own draw method(s), should also have own #drawOnAthensCanvas:
I didn't covered all of them yet, so a little help with it would be nice. Also, it is good for checking the missing functionality in Athens API as well as learning it.
There's not much to learn yet :)
basicly what you should know is that you have coordinate system:
canvas pathTransform  (instance of AthensAffineTransform)
which you can manipulate to achieve desirable results.
And actual drawing:
canvas setPaint: somePaintObject. ( color, gradient, or anything which conforms to AthensPaint protocol ). canvas drawShape: Â (rect or path or anything , which responds to: 'paintFillsUsing: aPaint on: anAthensCanvas' ). canvas draw: (anything , which responds to #drawOnAthensCanvas: )
think that we are dummies willing to help and do the two things I mention above. I'm then sure you will get contributions.
Stef
-- Best regards, Igor Stasenko.
put it in the class comments somewhere. Do not expect that people will know what you know. Make the entry simple and immediate. Stef
On 23 November 2011 11:21, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
Igor
prepare the following: - a class showing an example with the transformation stuff (because it is unclear)
There is one: AthensBalloonSurfaceExamples
- a tester canvas so that people can to
(CanvasTester testClass: CircleMorph) open.
err.. what is it?
To test morphic display on Athens you can do following:
| surf | surf := AthensBalloonSurface new form: (Form extent: Display extent depth: 32).
surf drawDuring: [ :canvas |
canvas fullDrawMorph: yourMorph. ].
Display getCanvas translucentImage: surf form at: 0@0
People could then extend the Athens package with the method in the morph.
It would be great to help adapting all morphs for Athens. Morphs, that having own draw method(s), should also have own #drawOnAthensCanvas:
I didn't covered all of them yet, so a little help with it would be nice. Also, it is good for checking the missing functionality in Athens API as well as learning it.
There's not much to learn yet :)
basicly what you should know is that you have coordinate system:
canvas pathTransform (instance of AthensAffineTransform)
which you can manipulate to achieve desirable results.
And actual drawing:
canvas setPaint: somePaintObject. ( color, gradient, or anything which conforms to AthensPaint protocol ). canvas drawShape: (rect or path or anything , which responds to: 'paintFillsUsing: aPaint on: anAthensCanvas' ). canvas draw: (anything , which responds to #drawOnAthensCanvas: )
think that we are dummies willing to help and do the two things I mention above. I'm then sure you will get contributions.
Stef
-- Best regards, Igor Stasenko.
+1 Something big is happening in the Pharo World. Alexandre On 23 Nov 2011, at 08:44, Stéphane Ducasse wrote:
put it in the class comments somewhere. Do not expect that people will know what you know. Make the entry simple and immediate.
Stef
On 23 November 2011 11:21, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
Igor
prepare the following: - a class showing an example with the transformation stuff (because it is unclear)
There is one: AthensBalloonSurfaceExamples
- a tester canvas so that people can to
(CanvasTester testClass: CircleMorph) open.
err.. what is it?
To test morphic display on Athens you can do following:
| surf | surf := AthensBalloonSurface new form: (Form extent: Display extent depth: 32).
surf drawDuring: [ :canvas |
canvas fullDrawMorph: yourMorph. ].
Display getCanvas translucentImage: surf form at: 0@0
People could then extend the Athens package with the method in the morph.
It would be great to help adapting all morphs for Athens. Morphs, that having own draw method(s), should also have own #drawOnAthensCanvas:
I didn't covered all of them yet, so a little help with it would be nice. Also, it is good for checking the missing functionality in Athens API as well as learning it.
There's not much to learn yet :)
basicly what you should know is that you have coordinate system:
canvas pathTransform (instance of AthensAffineTransform)
which you can manipulate to achieve desirable results.
And actual drawing:
canvas setPaint: somePaintObject. ( color, gradient, or anything which conforms to AthensPaint protocol ). canvas drawShape: (rect or path or anything , which responds to: 'paintFillsUsing: aPaint on: anAthensCanvas' ). canvas draw: (anything , which responds to #drawOnAthensCanvas: )
think that we are dummies willing to help and do the two things I mention above. I'm then sure you will get contributions.
Stef
-- Best regards, Igor Stasenko.
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
participants (4)
-
Alexandre Bergel -
Fernando Olivero -
Igor Stasenko -
Stéphane Ducasse