After loading the following packages attached to Issue 900
(http://code.google.com/p/moose-technology/issues/detail?id=900)
Glamour-Roassal-Presentations-BenComan.16.mcz 5.3 KB
Glamour-Morphic-Renderer-BenComan.216.mcz 52.0 KB
then adding the method defined below and evaluating its comment, from a
list you can select to display individual countries as per attached
image.
cheers -ben
GLMOtherExamples>>roassalCountries
"self new roassalCountries openOn: ROSVGPath countries"
| browser |
ROPlatform setCurrent: 'morphic'.
browser := GLMTabulator withStatusbar.
browser column: #list; column: #roassalRaw.
browser transmit to: #list; andShow:
[ :a |
a list
title: 'Select country'
].
browser transmit from: #list; to: #roassalRaw; andShow:
[ :a |
a roassal
title: 'Country Shape';
newViewBlock: [ ROView new @ RODraggable ] ;
painting:
[ :view :country | |path element|
path := ROSVGPath path: (ROSVGPath perform: country).
element := path elementOn: country.
view add: element.
view translateTo: path topLeftFromSVG negated.
].
].
^browser
------