Hi! I had fun understanding how countries may be described using SVG. Here is a first shoot: Moving the mouse above a country name highlight the country. You can now rehearse your geography. The complete source code of this example is: -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= | view element nameComponent label | view := ROView new. ROSVGPath countries do: [ :k | element := (ROSVGPath path: (ROSVGPath perform: k)) elementOn: k. view add: element. ]. nameComponent := ROElement new. ROSVGPath countries do: [ :k | label := ROLabel elementOn: k asString. label @ ROLightlyHighlightable. label on: ROMouseEnter do: [ :event | ROBlink highlight: (view elementFromModel: event model asSymbol) ]. label on: ROMouseLeave do: [ :event | ROBlink unhighlight: (view elementFromModel: event model asSymbol) ]. nameComponent add: label. ]. ROGridLayout new gapSize: -3; lineItemsCount: 15; on: nameComponent elements. view add: nameComponent. nameComponent translateTo: 0 @ 400. view openInWindowSized: 1000 @ 700 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Another example on which you can zoom in and out. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-= | view element nameComponent label stack | view := ROView new. view @ RODraggable. ROSVGPath southAmerica do: [ :k | element := (ROSVGPath path: (ROSVGPath perform: k)) elementOn: k. view add: element. ]. nameComponent := ROElement new. ROSVGPath southAmerica do: [ :k | label := ROLabel elementOn: k asString. label @ ROLightlyHighlightable. label on: ROMouseEnter do: [ :event | ROBlink highlight: (view elementFromModel: event model asSymbol) ]. label on: ROMouseLeave do: [ :event | ROBlink unhighlight: (view elementFromModel: event model asSymbol) ]. nameComponent add: label. ]. ROGridLayout new gapSize: -3; lineItemsCount: 15; on: nameComponent elements. stack := ROViewStack new. stack zoomInButton; zoomOutButton. stack addView: view. stack add: nameComponent. nameComponent translateTo: 0 @ 20. stack openInWindowSized: 1000 @ 700 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-= On Nov 16, 2013, at 5:44 PM, Alexandre Bergel <alexandre.bergel@me.com> wrote:
Hi!
I had fun understanding how countries may be described using SVG. Here is a first shoot:
<Screen Shot 2013-11-16 at 5.36.21 PM.png>
Moving the mouse above a country name highlight the country. You can now rehearse your geography.
The complete source code of this example is:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= | view element nameComponent label | view := ROView new.
ROSVGPath countries do: [ :k | element := (ROSVGPath path: (ROSVGPath perform: k)) elementOn: k. view add: element. ].
nameComponent := ROElement new. ROSVGPath countries do: [ :k | label := ROLabel elementOn: k asString. label @ ROLightlyHighlightable. label on: ROMouseEnter do: [ :event | ROBlink highlight: (view elementFromModel: event model asSymbol) ]. label on: ROMouseLeave do: [ :event | ROBlink unhighlight: (view elementFromModel: event model asSymbol) ]. nameComponent add: label. ]. ROGridLayout new gapSize: -3; lineItemsCount: 15; on: nameComponent elements.
view add: nameComponent. nameComponent translateTo: 0 @ 400.
view openInWindowSized: 1000 @ 700 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
This is really great! Doru On Sat, Nov 16, 2013 at 9:47 PM, Alexandre Bergel <alexandre.bergel@me.com>wrote:
Another example on which you can zoom in and out.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= | view element nameComponent label stack | view := ROView new. view @ RODraggable.
ROSVGPath southAmerica do: [ :k |
element := (ROSVGPath path: (ROSVGPath perform: k)) elementOn: k. view add: element. ].
nameComponent := ROElement new. ROSVGPath southAmerica do: [ :k |
label := ROLabel elementOn: k asString. label @ ROLightlyHighlightable. label on: ROMouseEnter do: [ :event | ROBlink highlight: (view elementFromModel: event model asSymbol) ]. label on: ROMouseLeave do: [ :event | ROBlink unhighlight: (view elementFromModel: event model asSymbol) ]. nameComponent add: label. ]. ROGridLayout new gapSize: -3; lineItemsCount: 15; on: nameComponent elements.
stack := ROViewStack new. stack zoomInButton; zoomOutButton. stack addView: view.
stack add: nameComponent. nameComponent translateTo: 0 @ 20.
stack openInWindowSized: 1000 @ 700 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
On Nov 16, 2013, at 5:44 PM, Alexandre Bergel <alexandre.bergel@me.com> wrote:
Hi!
I had fun understanding how countries may be described using SVG. Here is a first shoot:
<Screen Shot 2013-11-16 at 5.36.21 PM.png>
Moving the mouse above a country name highlight the country. You can now rehearse your geography.
The complete source code of this example is:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= | view element nameComponent label | view := ROView new.
ROSVGPath countries do: [ :k | element := (ROSVGPath path: (ROSVGPath perform: k)) elementOn: k. view add: element. ].
nameComponent := ROElement new. ROSVGPath countries do: [ :k | label := ROLabel elementOn: k asString. label @ ROLightlyHighlightable. label on: ROMouseEnter do: [ :event | ROBlink highlight: (view elementFromModel: event model asSymbol) ]. label on: ROMouseLeave do: [ :event | ROBlink unhighlight: (view elementFromModel: event model asSymbol) ]. nameComponent add: label. ]. ROGridLayout new gapSize: -3; lineItemsCount: 15; on: nameComponent elements.
view add: nameComponent. nameComponent translateTo: 0 @ 400.
view openInWindowSized: 1000 @ 700 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
-- www.tudorgirba.com "Every thing has its own flow"
Nice! Though I am a bit confused, what has displaying vector graphics with SVG to do? I don't fully get the interaction from your example :) On 2013-11-16, at 22:39, Tudor Girba <tudor@tudorgirba.com> wrote:
This is really great!
Doru
On Sat, Nov 16, 2013 at 9:47 PM, Alexandre Bergel <alexandre.bergel@me.com> wrote: Another example on which you can zoom in and out.
<Screen Shot 2013-11-16 at 5.47.07 PM.png>
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= | view element nameComponent label stack | view := ROView new. view @ RODraggable.
ROSVGPath southAmerica do: [ :k |
element := (ROSVGPath path: (ROSVGPath perform: k)) elementOn: k. view add: element. ].
nameComponent := ROElement new. ROSVGPath southAmerica do: [ :k |
label := ROLabel elementOn: k asString. label @ ROLightlyHighlightable. label on: ROMouseEnter do: [ :event | ROBlink highlight: (view elementFromModel: event model asSymbol) ]. label on: ROMouseLeave do: [ :event | ROBlink unhighlight: (view elementFromModel: event model asSymbol) ]. nameComponent add: label. ]. ROGridLayout new gapSize: -3; lineItemsCount: 15; on: nameComponent elements.
stack := ROViewStack new. stack zoomInButton; zoomOutButton. stack addView: view.
stack add: nameComponent. nameComponent translateTo: 0 @ 20.
stack openInWindowSized: 1000 @ 700 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
On Nov 16, 2013, at 5:44 PM, Alexandre Bergel <alexandre.bergel@me.com> wrote:
Hi!
I had fun understanding how countries may be described using SVG. Here is a first shoot:
<Screen Shot 2013-11-16 at 5.36.21 PM.png>
Moving the mouse above a country name highlight the country. You can now rehearse your geography.
The complete source code of this example is:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= | view element nameComponent label | view := ROView new.
ROSVGPath countries do: [ :k | element := (ROSVGPath path: (ROSVGPath perform: k)) elementOn: k. view add: element. ].
nameComponent := ROElement new. ROSVGPath countries do: [ :k | label := ROLabel elementOn: k asString. label @ ROLightlyHighlightable. label on: ROMouseEnter do: [ :event | ROBlink highlight: (view elementFromModel: event model asSymbol) ]. label on: ROMouseLeave do: [ :event | ROBlink unhighlight: (view elementFromModel: event model asSymbol) ]. nameComponent add: label. ]. ROGridLayout new gapSize: -3; lineItemsCount: 15; on: nameComponent elements.
view add: nameComponent. nameComponent translateTo: 0 @ 400.
view openInWindowSized: 1000 @ 700 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
-- www.tudorgirba.com
"Every thing has its own flow"
SVG path gives us a list of segment coordinates. We process each coordinate using the camera, which gives translation and zoom. The interaction maybe not that obvious from the example. Having the mouse over a name highlights the country. Cheers, Alexandre
Le 16-11-2013 à 19:28, Camillo Bruni <camillobruni@gmail.com> a écrit :
Nice!
Though I am a bit confused, what has displaying vector graphics with SVG to do? I don't fully get the interaction from your example :)
On 2013-11-16, at 22:39, Tudor Girba <tudor@tudorgirba.com> wrote:
This is really great!
Doru
On Sat, Nov 16, 2013 at 9:47 PM, Alexandre Bergel <alexandre.bergel@me.com> wrote: Another example on which you can zoom in and out.
<Screen Shot 2013-11-16 at 5.47.07 PM.png>
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= | view element nameComponent label stack | view := ROView new. view @ RODraggable.
ROSVGPath southAmerica do: [ :k |
element := (ROSVGPath path: (ROSVGPath perform: k)) elementOn: k. view add: element. ].
nameComponent := ROElement new. ROSVGPath southAmerica do: [ :k |
label := ROLabel elementOn: k asString. label @ ROLightlyHighlightable. label on: ROMouseEnter do: [ :event | ROBlink highlight: (view elementFromModel: event model asSymbol) ]. label on: ROMouseLeave do: [ :event | ROBlink unhighlight: (view elementFromModel: event model asSymbol) ]. nameComponent add: label. ]. ROGridLayout new gapSize: -3; lineItemsCount: 15; on: nameComponent elements.
stack := ROViewStack new. stack zoomInButton; zoomOutButton. stack addView: view.
stack add: nameComponent. nameComponent translateTo: 0 @ 20.
stack openInWindowSized: 1000 @ 700 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
On Nov 16, 2013, at 5:44 PM, Alexandre Bergel <alexandre.bergel@me.com> wrote:
Hi!
I had fun understanding how countries may be described using SVG. Here is a first shoot:
<Screen Shot 2013-11-16 at 5.36.21 PM.png>
Moving the mouse above a country name highlight the country. You can now rehearse your geography.
The complete source code of this example is:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= | view element nameComponent label | view := ROView new.
ROSVGPath countries do: [ :k | element := (ROSVGPath path: (ROSVGPath perform: k)) elementOn: k. view add: element. ].
nameComponent := ROElement new. ROSVGPath countries do: [ :k | label := ROLabel elementOn: k asString. label @ ROLightlyHighlightable. label on: ROMouseEnter do: [ :event | ROBlink highlight: (view elementFromModel: event model asSymbol) ]. label on: ROMouseLeave do: [ :event | ROBlink unhighlight: (view elementFromModel: event model asSymbol) ]. nameComponent add: label. ]. ROGridLayout new gapSize: -3; lineItemsCount: 15; on: nameComponent elements.
view add: nameComponent. nameComponent translateTo: 0 @ 400.
view openInWindowSized: 1000 @ 700 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
-- www.tudorgirba.com
"Every thing has its own flow"
I guess the answer to Camillo is that the link between SVG and the picture of Alex is that the map data is available as SVG :). Alex imported the map from SVG and drew it with Roassal. Doru On Sun, Nov 17, 2013 at 12:02 AM, Alexandre Bergel <alexandre.bergel@me.com>wrote:
SVG path gives us a list of segment coordinates. We process each coordinate using the camera, which gives translation and zoom.
The interaction maybe not that obvious from the example. Having the mouse over a name highlights the country.
Cheers, Alexandre
Le 16-11-2013 à 19:28, Camillo Bruni <camillobruni@gmail.com> a écrit :
Nice!
Though I am a bit confused, what has displaying vector graphics with SVG to do? I don't fully get the interaction from your example :)
On 2013-11-16, at 22:39, Tudor Girba <tudor@tudorgirba.com> wrote:
This is really great!
Doru
On Sat, Nov 16, 2013 at 9:47 PM, Alexandre Bergel < alexandre.bergel@me.com> wrote: Another example on which you can zoom in and out.
<Screen Shot 2013-11-16 at 5.47.07 PM.png>
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= | view element nameComponent label stack | view := ROView new. view @ RODraggable.
ROSVGPath southAmerica do: [ :k |
element := (ROSVGPath path: (ROSVGPath perform: k)) elementOn: k. view add: element. ].
nameComponent := ROElement new. ROSVGPath southAmerica do: [ :k |
label := ROLabel elementOn: k asString. label @ ROLightlyHighlightable. label on: ROMouseEnter do: [ :event | ROBlink highlight: (view elementFromModel: event model asSymbol) ]. label on: ROMouseLeave do: [ :event | ROBlink unhighlight: (view elementFromModel: event model asSymbol) ]. nameComponent add: label. ]. ROGridLayout new gapSize: -3; lineItemsCount: 15; on: nameComponent elements.
stack := ROViewStack new. stack zoomInButton; zoomOutButton. stack addView: view.
stack add: nameComponent. nameComponent translateTo: 0 @ 20.
stack openInWindowSized: 1000 @ 700 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
On Nov 16, 2013, at 5:44 PM, Alexandre Bergel <alexandre.bergel@me.com> wrote:
Hi!
I had fun understanding how countries may be described using SVG. Here is a first shoot:
<Screen Shot 2013-11-16 at 5.36.21 PM.png>
Moving the mouse above a country name highlight the country. You can now rehearse your geography.
The complete source code of this example is:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= | view element nameComponent label | view := ROView new.
ROSVGPath countries do: [ :k | element := (ROSVGPath path: (ROSVGPath perform: k)) elementOn: k. view add: element. ].
nameComponent := ROElement new. ROSVGPath countries do: [ :k | label := ROLabel elementOn: k asString. label @ ROLightlyHighlightable. label on: ROMouseEnter do: [ :event | ROBlink highlight: (view elementFromModel: event model asSymbol) ]. label on: ROMouseLeave do: [ :event | ROBlink unhighlight: (view elementFromModel: event model asSymbol) ]. nameComponent add: label. ]. ROGridLayout new gapSize: -3; lineItemsCount: 15; on: nameComponent elements.
view add: nameComponent. nameComponent translateTo: 0 @ 400.
view openInWindowSized: 1000 @ 700 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
-- www.tudorgirba.com
"Every thing has its own flow"
-- www.tudorgirba.com "Every thing has its own flow"
ok, makes more sense now :) On 2013-11-17, at 00:11, Tudor Girba <tudor@tudorgirba.com> wrote:
I guess the answer to Camillo is that the link between SVG and the picture of Alex is that the map data is available as SVG :). Alex imported the map from SVG and drew it with Roassal.
Doru
On Sun, Nov 17, 2013 at 12:02 AM, Alexandre Bergel <alexandre.bergel@me.com> wrote: SVG path gives us a list of segment coordinates. We process each coordinate using the camera, which gives translation and zoom.
The interaction maybe not that obvious from the example. Having the mouse over a name highlights the country.
Cheers, Alexandre
Le 16-11-2013 à 19:28, Camillo Bruni <camillobruni@gmail.com> a écrit :
Nice!
Though I am a bit confused, what has displaying vector graphics with SVG to do? I don't fully get the interaction from your example :)
On 2013-11-16, at 22:39, Tudor Girba <tudor@tudorgirba.com> wrote:
This is really great!
Doru
On Sat, Nov 16, 2013 at 9:47 PM, Alexandre Bergel <alexandre.bergel@me.com> wrote: Another example on which you can zoom in and out.
<Screen Shot 2013-11-16 at 5.47.07 PM.png>
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= | view element nameComponent label stack | view := ROView new. view @ RODraggable.
ROSVGPath southAmerica do: [ :k |
element := (ROSVGPath path: (ROSVGPath perform: k)) elementOn: k. view add: element. ].
nameComponent := ROElement new. ROSVGPath southAmerica do: [ :k |
label := ROLabel elementOn: k asString. label @ ROLightlyHighlightable. label on: ROMouseEnter do: [ :event | ROBlink highlight: (view elementFromModel: event model asSymbol) ]. label on: ROMouseLeave do: [ :event | ROBlink unhighlight: (view elementFromModel: event model asSymbol) ]. nameComponent add: label. ]. ROGridLayout new gapSize: -3; lineItemsCount: 15; on: nameComponent elements.
stack := ROViewStack new. stack zoomInButton; zoomOutButton. stack addView: view.
stack add: nameComponent. nameComponent translateTo: 0 @ 20.
stack openInWindowSized: 1000 @ 700 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
On Nov 16, 2013, at 5:44 PM, Alexandre Bergel <alexandre.bergel@me.com> wrote:
Hi!
I had fun understanding how countries may be described using SVG. Here is a first shoot:
<Screen Shot 2013-11-16 at 5.36.21 PM.png>
Moving the mouse above a country name highlight the country. You can now rehearse your geography.
The complete source code of this example is:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= | view element nameComponent label | view := ROView new.
ROSVGPath countries do: [ :k | element := (ROSVGPath path: (ROSVGPath perform: k)) elementOn: k. view add: element. ].
nameComponent := ROElement new. ROSVGPath countries do: [ :k | label := ROLabel elementOn: k asString. label @ ROLightlyHighlightable. label on: ROMouseEnter do: [ :event | ROBlink highlight: (view elementFromModel: event model asSymbol) ]. label on: ROMouseLeave do: [ :event | ROBlink unhighlight: (view elementFromModel: event model asSymbol) ]. nameComponent add: label. ]. ROGridLayout new gapSize: -3; lineItemsCount: 15; on: nameComponent elements.
view add: nameComponent. nameComponent translateTo: 0 @ 400.
view openInWindowSized: 1000 @ 700 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
-- www.tudorgirba.com
"Every thing has its own flow"
-- www.tudorgirba.com
"Every thing has its own flow"
Alex you should not mix layer. SVG is a format for saving data. I do not understand why - you need to wrapp then to a RO specific objects - why the use need to see and get expose with the underlying svg specific things. you should have an importer SVG and other format to Path objects probably athensPath Why do you need RO* specific object? On Nov 17, 2013, at 12:02 AM, Alexandre Bergel <alexandre.bergel@me.com> wrote:
SVG path gives us a list of segment coordinates. We process each coordinate using the camera, which gives translation and zoom.
The interaction maybe not that obvious from the example. Having the mouse over a name highlights the country.
Cheers, Alexandre
Le 16-11-2013 à 19:28, Camillo Bruni <camillobruni@gmail.com> a écrit :
Nice!
Though I am a bit confused, what has displaying vector graphics with SVG to do? I don't fully get the interaction from your example :)
On 2013-11-16, at 22:39, Tudor Girba <tudor@tudorgirba.com> wrote:
This is really great!
Doru
On Sat, Nov 16, 2013 at 9:47 PM, Alexandre Bergel <alexandre.bergel@me.com> wrote: Another example on which you can zoom in and out.
<Screen Shot 2013-11-16 at 5.47.07 PM.png>
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= | view element nameComponent label stack | view := ROView new. view @ RODraggable.
ROSVGPath southAmerica do: [ :k |
element := (ROSVGPath path: (ROSVGPath perform: k)) elementOn: k. view add: element. ].
nameComponent := ROElement new. ROSVGPath southAmerica do: [ :k |
label := ROLabel elementOn: k asString. label @ ROLightlyHighlightable. label on: ROMouseEnter do: [ :event | ROBlink highlight: (view elementFromModel: event model asSymbol) ]. label on: ROMouseLeave do: [ :event | ROBlink unhighlight: (view elementFromModel: event model asSymbol) ]. nameComponent add: label. ]. ROGridLayout new gapSize: -3; lineItemsCount: 15; on: nameComponent elements.
stack := ROViewStack new. stack zoomInButton; zoomOutButton. stack addView: view.
stack add: nameComponent. nameComponent translateTo: 0 @ 20.
stack openInWindowSized: 1000 @ 700 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
On Nov 16, 2013, at 5:44 PM, Alexandre Bergel <alexandre.bergel@me.com> wrote:
Hi!
I had fun understanding how countries may be described using SVG. Here is a first shoot:
<Screen Shot 2013-11-16 at 5.36.21 PM.png>
Moving the mouse above a country name highlight the country. You can now rehearse your geography.
The complete source code of this example is:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= | view element nameComponent label | view := ROView new.
ROSVGPath countries do: [ :k | element := (ROSVGPath path: (ROSVGPath perform: k)) elementOn: k. view add: element. ].
nameComponent := ROElement new. ROSVGPath countries do: [ :k | label := ROLabel elementOn: k asString. label @ ROLightlyHighlightable. label on: ROMouseEnter do: [ :event | ROBlink highlight: (view elementFromModel: event model asSymbol) ]. label on: ROMouseLeave do: [ :event | ROBlink unhighlight: (view elementFromModel: event model asSymbol) ]. nameComponent add: label. ]. ROGridLayout new gapSize: -3; lineItemsCount: 15; on: nameComponent elements.
view add: nameComponent. nameComponent translateTo: 0 @ 400.
view openInWindowSized: 1000 @ 700 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
-- www.tudorgirba.com
"Every thing has its own flow"
+1 On Nov 16, 2013, at 11:28 PM, Camillo Bruni <camillobruni@gmail.com> wrote:
Nice!
Though I am a bit confused, what has displaying vector graphics with SVG to do? I don't fully get the interaction from your example :)
On 2013-11-16, at 22:39, Tudor Girba <tudor@tudorgirba.com> wrote:
This is really great!
Doru
On Sat, Nov 16, 2013 at 9:47 PM, Alexandre Bergel <alexandre.bergel@me.com> wrote: Another example on which you can zoom in and out.
<Screen Shot 2013-11-16 at 5.47.07 PM.png>
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= | view element nameComponent label stack | view := ROView new. view @ RODraggable.
ROSVGPath southAmerica do: [ :k |
element := (ROSVGPath path: (ROSVGPath perform: k)) elementOn: k. view add: element. ].
nameComponent := ROElement new. ROSVGPath southAmerica do: [ :k |
label := ROLabel elementOn: k asString. label @ ROLightlyHighlightable. label on: ROMouseEnter do: [ :event | ROBlink highlight: (view elementFromModel: event model asSymbol) ]. label on: ROMouseLeave do: [ :event | ROBlink unhighlight: (view elementFromModel: event model asSymbol) ]. nameComponent add: label. ]. ROGridLayout new gapSize: -3; lineItemsCount: 15; on: nameComponent elements.
stack := ROViewStack new. stack zoomInButton; zoomOutButton. stack addView: view.
stack add: nameComponent. nameComponent translateTo: 0 @ 20.
stack openInWindowSized: 1000 @ 700 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
On Nov 16, 2013, at 5:44 PM, Alexandre Bergel <alexandre.bergel@me.com> wrote:
Hi!
I had fun understanding how countries may be described using SVG. Here is a first shoot:
<Screen Shot 2013-11-16 at 5.36.21 PM.png>
Moving the mouse above a country name highlight the country. You can now rehearse your geography.
The complete source code of this example is:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= | view element nameComponent label | view := ROView new.
ROSVGPath countries do: [ :k | element := (ROSVGPath path: (ROSVGPath perform: k)) elementOn: k. view add: element. ].
nameComponent := ROElement new. ROSVGPath countries do: [ :k | label := ROLabel elementOn: k asString. label @ ROLightlyHighlightable. label on: ROMouseEnter do: [ :event | ROBlink highlight: (view elementFromModel: event model asSymbol) ]. label on: ROMouseLeave do: [ :event | ROBlink unhighlight: (view elementFromModel: event model asSymbol) ]. nameComponent add: label. ]. ROGridLayout new gapSize: -3; lineItemsCount: 15; on: nameComponent elements.
view add: nameComponent. nameComponent translateTo: 0 @ 400.
view openInWindowSized: 1000 @ 700 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
-- www.tudorgirba.com
"Every thing has its own flow"
I see that you have a loooot of fun. Now I have the impression that in the future version you should not expose ROSVGPath and others because there are at the importer level not Roassal. So why do you need to wrap them. If there is something missing in SVGPath what is it? Stef
Hi!
I had fun understanding how countries may be described using SVG. Here is a first shoot:
<Screen Shot 2013-11-16 at 5.36.21 PM.png>
Moving the mouse above a country name highlight the country. You can now rehearse your geography.
The complete source code of this example is:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= | view element nameComponent label | view := ROView new.
ROSVGPath countries do: [ :k | element := (ROSVGPath path: (ROSVGPath perform: k)) elementOn: k. view add: element. ].
nameComponent := ROElement new. ROSVGPath countries do: [ :k | label := ROLabel elementOn: k asString. label @ ROLightlyHighlightable. label on: ROMouseEnter do: [ :event | ROBlink highlight: (view elementFromModel: event model asSymbol) ]. label on: ROMouseLeave do: [ :event | ROBlink unhighlight: (view elementFromModel: event model asSymbol) ]. nameComponent add: label. ]. ROGridLayout new gapSize: -3; lineItemsCount: 15; on: nameComponent elements.
view add: nameComponent. nameComponent translateTo: 0 @ 400.
view openInWindowSized: 1000 @ 700 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Within Roassal I need to have a svg shape that knows about a path. Currently I do not make use of Athens to draw the SVG, I simply use Athens to draw lines. Within Roassal I can define any SVG path as a shape. For example: view add: (ROSVGPath path: 'M10,10 L30,30') element Why this should not be at the level of Roassal? If I want to define a box, I would simply do view add: (ROBox new extent: 30 @ 20) element It follows the same pattern no? Alexandre On Nov 17, 2013, at 8:45 AM, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
I see that you have a loooot of fun. Now I have the impression that in the future version you should not expose ROSVGPath and others because there are at the importer level not Roassal. So why do you need to wrap them. If there is something missing in SVGPath what is it?
Stef
Hi!
I had fun understanding how countries may be described using SVG. Here is a first shoot:
<Screen Shot 2013-11-16 at 5.36.21 PM.png>
Moving the mouse above a country name highlight the country. You can now rehearse your geography.
The complete source code of this example is:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= | view element nameComponent label | view := ROView new.
ROSVGPath countries do: [ :k | element := (ROSVGPath path: (ROSVGPath perform: k)) elementOn: k. view add: element. ].
nameComponent := ROElement new. ROSVGPath countries do: [ :k | label := ROLabel elementOn: k asString. label @ ROLightlyHighlightable. label on: ROMouseEnter do: [ :event | ROBlink highlight: (view elementFromModel: event model asSymbol) ]. label on: ROMouseLeave do: [ :event | ROBlink unhighlight: (view elementFromModel: event model asSymbol) ]. nameComponent add: label. ]. ROGridLayout new gapSize: -3; lineItemsCount: 15; on: nameComponent elements.
view add: nameComponent. nameComponent translateTo: 0 @ 400.
view openInWindowSized: 1000 @ 700 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Within Roassal I need to have a svg shape that knows about a path. Currently I do not make use of Athens to draw the SVG, I simply use Athens to draw lines.
But in roassal you do not have the concept of a polylines? Ok I saw that SVGPath are not polyline as I originally thought. NOw I do not get why you want to pollute Roassal with SVG names. If you introduce the notion of Path why don;t you do it independent of SVG because SVG is one way to represent path.
Within Roassal I can define any SVG path as a shape. For example: view add: (ROSVGPath path: 'M10,10 L30,30') element
Why this should not be at the level of Roassal? If I want to define a box, I would simply do view add: (ROBox new extent: 30 @ 20) element
Because I think that as a user I do not want to if my code works on svg or another external format.
It follows the same pattern no?
Yes but this is different because ROBox is a roassal box not an svg or another format. If tomorrow you get a pdf reader and access a library of pdf library. Do you want your reader to have ROPDFBox? in SVG you also have Rectangle <rect> Circle <circle> Ellipse <ellipse> Line <line> Polyline <polyline> Polygon <polygon> Path <path> So I imagine (and hope) that you will not introduce ROSVGRectangle ROSVGLine ROSVGCircle? So why introducing ROSVGPath Stef
Alexandre
On Nov 17, 2013, at 8:45 AM, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
I see that you have a loooot of fun. Now I have the impression that in the future version you should not expose ROSVGPath and others because there are at the importer level not Roassal. So why do you need to wrap them. If there is something missing in SVGPath what is it?
Stef
Hi!
I had fun understanding how countries may be described using SVG. Here is a first shoot:
<Screen Shot 2013-11-16 at 5.36.21 PM.png>
Moving the mouse above a country name highlight the country. You can now rehearse your geography.
The complete source code of this example is:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= | view element nameComponent label | view := ROView new.
ROSVGPath countries do: [ :k | element := (ROSVGPath path: (ROSVGPath perform: k)) elementOn: k. view add: element. ].
nameComponent := ROElement new. ROSVGPath countries do: [ :k | label := ROLabel elementOn: k asString. label @ ROLightlyHighlightable. label on: ROMouseEnter do: [ :event | ROBlink highlight: (view elementFromModel: event model asSymbol) ]. label on: ROMouseLeave do: [ :event | ROBlink unhighlight: (view elementFromModel: event model asSymbol) ]. nameComponent add: label. ]. ROGridLayout new gapSize: -3; lineItemsCount: 15; on: nameComponent elements.
view add: nameComponent. nameComponent translateTo: 0 @ 400.
view openInWindowSized: 1000 @ 700 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Hi Stef, Your email made me think a lot.
But in roassal you do not have the concept of a polylines?
Actually no, but it is likely that we should. A general way to defines polygons is the way to go.
I do not get why you want to pollute Roassal with SVG names. If you introduce the notion of Path why don;t you do it independent of SVG because SVG is one way to represent path.
After having played with Athens, I understand better what you actually mean. Indeed, the end user should work with a notion of polygon in general, and not with SVG.
Because I think that as a user I do not want to if my code works on svg or another external format.
It follows the same pattern no?
Yes but this is different because ROBox is a roassal box not an svg or another format. If tomorrow you get a pdf reader and access a library of pdf library. Do you want your reader to have ROPDFBox?
in SVG you also have
⢠Rectangle <rect> ⢠Circle <circle> ⢠Ellipse <ellipse> ⢠Line <line> ⢠Polyline <polyline> ⢠Polygon <polygon> ⢠Path <path> So I imagine (and hope) that you will not introduce ROSVGRectangle ROSVGLine ROSVGCircle?
So why introducing ROSVGPath
You are very very right. We indeed do not want to introduce all these classes. Your email made me think about something: rewriting Roassal from scratch, but putting the core notions brought by Athens at the center of Roassal. I spend some time on getting the camera working in Roassal, but Athens was not ready yet. More Roassal will use Athens, and more we are taking advantages of the graphic card. Also, do we have to wait for the text editor to include Athens in Pharo? The text editor is essentially to bootstrap and remove Morphic right? But until then, Athens could be part of Pharo. I am now using the Moose image, which is nicely packaged with proper fonts and Athens. Since there are many users of Roassal on Morphic, it is hard for me to move to 100% Athens. Thanks again for your email Alexandre
Stef
Alexandre
On Nov 17, 2013, at 8:45 AM, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
I see that you have a loooot of fun. Now I have the impression that in the future version you should not expose ROSVGPath and others because there are at the importer level not Roassal. So why do you need to wrap them. If there is something missing in SVGPath what is it?
Stef
Hi!
I had fun understanding how countries may be described using SVG. Here is a first shoot:
<Screen Shot 2013-11-16 at 5.36.21 PM.png>
Moving the mouse above a country name highlight the country. You can now rehearse your geography.
The complete source code of this example is:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= | view element nameComponent label | view := ROView new.
ROSVGPath countries do: [ :k | element := (ROSVGPath path: (ROSVGPath perform: k)) elementOn: k. view add: element. ].
nameComponent := ROElement new. ROSVGPath countries do: [ :k | label := ROLabel elementOn: k asString. label @ ROLightlyHighlightable. label on: ROMouseEnter do: [ :event | ROBlink highlight: (view elementFromModel: event model asSymbol) ]. label on: ROMouseLeave do: [ :event | ROBlink unhighlight: (view elementFromModel: event model asSymbol) ]. nameComponent add: label. ]. ROGridLayout new gapSize: -3; lineItemsCount: 15; on: nameComponent elements.
view add: nameComponent. nameComponent translateTo: 0 @ 400.
view openInWindowSized: 1000 @ 700 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
_______________________________________________ Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Hi, On Mon, Nov 18, 2013 at 9:44 PM, Alexandre Bergel <alexandre.bergel@me.com>wrote:
Hi Stef,
Your email made me think a lot.
But in roassal you do not have the concept of a polylines?
Actually no, but it is likely that we should. A general way to defines polygons is the way to go.
I do not get why you want to pollute Roassal with SVG names. If you introduce the notion of Path why don;t you do it independent of SVG because SVG is one way to represent path.
After having played with Athens, I understand better what you actually mean. Indeed, the end user should work with a notion of polygon in general, and not with SVG.
Because I think that as a user I do not want to if my code works on svg or another external format.
It follows the same pattern no?
Yes but this is different because ROBox is a roassal box not an svg or another format. If tomorrow you get a pdf reader and access a library of pdf library. Do you want your reader to have ROPDFBox?
in SVG you also have
⢠Rectangle <rect> ⢠Circle <circle> ⢠Ellipse <ellipse> ⢠Line <line> ⢠Polyline <polyline> ⢠Polygon <polygon> ⢠Path <path> So I imagine (and hope) that you will not introduce ROSVGRectangle ROSVGLine ROSVGCircle?
So why introducing ROSVGPath
You are very very right. We indeed do not want to introduce all these classes.
Your email made me think about something: rewriting Roassal from scratch, but putting the core notions brought by Athens at the center of Roassal. I spend some time on getting the camera working in Roassal, but Athens was not ready yet. More Roassal will use Athens, and more we are taking advantages of the graphic card.
This would be so great.
Also, do we have to wait for the text editor to include Athens in Pharo? The text editor is essentially to bootstrap and remove Morphic right? But until then, Athens could be part of Pharo. I am now using the Moose image, which is nicely packaged with proper fonts and Athens. Since there are many users of Roassal on Morphic, it is hard for me to move to 100% Athens.
What do you mean? Athens is in Pharo 3.0 by default. We are no longer loading it manually. You can safely invest all your energy in Athens :). Doru
Thanks again for your email
Alexandre
Stef
Alexandre
On Nov 17, 2013, at 8:45 AM, Stéphane Ducasse <
stephane.ducasse@inria.fr> wrote:
I see that you have a loooot of fun. Now I have the impression that in the future version you should not
expose ROSVGPath and others
because there are at the importer level not Roassal. So why do you need to wrap them. If there is something missing in SVGPath what is it?
Stef
Hi!
I had fun understanding how countries may be described using SVG. Here is a first shoot:
<Screen Shot 2013-11-16 at 5.36.21 PM.png>
Moving the mouse above a country name highlight the country. You can now rehearse your geography.
The complete source code of this example is:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= | view element nameComponent label | view := ROView new.
ROSVGPath countries do: [ :k | element := (ROSVGPath path: (ROSVGPath perform: k)) elementOn: k. view add: element. ].
nameComponent := ROElement new. ROSVGPath countries do: [ :k | label := ROLabel elementOn: k asString. label @ ROLightlyHighlightable. label on: ROMouseEnter do: [ :event | ROBlink highlight: (view elementFromModel: event model asSymbol) ]. label on: ROMouseLeave do: [ :event | ROBlink unhighlight: (view elementFromModel: event model asSymbol) ]. nameComponent add: label. ]. ROGridLayout new gapSize: -3; lineItemsCount: 15; on: nameComponent elements.
view add: nameComponent. nameComponent translateTo: 0 @ 400.
view openInWindowSized: 1000 @ 700 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
_______________________________________________ Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
-- www.tudorgirba.com "Every thing has its own flow"
What do you mean? Athens is in Pharo 3.0 by default. We are no longer loading it manually. You can safely invest all your energy in Athens :).
:-) I will Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
You are very very right. We indeed do not want to introduce all these classes.
Your email made me think about something: rewriting Roassal from scratch, but putting the core notions brought by Athens at the center of Roassal.
May be you should a controlled experience to see but indeed this would be great.
I spend some time on getting the camera working in Roassal, but Athens was not ready yet. More Roassal will use Athens, and more we are taking advantages of the graphic card.
Also, do we have to wait for the text editor to include Athens in Pharo?
why do you need to edit large text in roassal? I do not think so. Athens supports string rendering and all the rest.
The text editor is essentially to bootstrap and remove Morphic right? But until then, Athens could be part of Pharo.
Athens is part of Pharo already. I do not understand your problem. You have a window in which you can render object using Athens.
I am now using the Moose image, which is nicely packaged with proper fonts and Athens.
But Moose does not do anything about the packaging of Athens, it is done in Pharo.
Since there are many users of Roassal on Morphic, it is hard for me to move to 100% Athens.
Why this is just a different renderer.
Thanks again for your email
Alexandre
Stef
Alexandre
On Nov 17, 2013, at 8:45 AM, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
I see that you have a loooot of fun. Now I have the impression that in the future version you should not expose ROSVGPath and others because there are at the importer level not Roassal. So why do you need to wrap them. If there is something missing in SVGPath what is it?
Stef
Hi!
I had fun understanding how countries may be described using SVG. Here is a first shoot:
<Screen Shot 2013-11-16 at 5.36.21 PM.png>
Moving the mouse above a country name highlight the country. You can now rehearse your geography.
The complete source code of this example is:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= | view element nameComponent label | view := ROView new.
ROSVGPath countries do: [ :k | element := (ROSVGPath path: (ROSVGPath perform: k)) elementOn: k. view add: element. ].
nameComponent := ROElement new. ROSVGPath countries do: [ :k | label := ROLabel elementOn: k asString. label @ ROLightlyHighlightable. label on: ROMouseEnter do: [ :event | ROBlink highlight: (view elementFromModel: event model asSymbol) ]. label on: ROMouseLeave do: [ :event | ROBlink unhighlight: (view elementFromModel: event model asSymbol) ]. nameComponent add: label. ]. ROGridLayout new gapSize: -3; lineItemsCount: 15; on: nameComponent elements.
view add: nameComponent. nameComponent translateTo: 0 @ 400.
view openInWindowSized: 1000 @ 700 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
_______________________________________________ Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
participants (4)
-
Alexandre Bergel -
Camillo Bruni -
Stéphane Ducasse -
Tudor Girba