This is rather easy.
In a 2.0 image, load Athens, and Roassal.
Change the font to support FreeType fonts. This is necessarily else nothing can be done
otherwise.
Then, you need to load the RoassalAthens package from the Roassal SmalltalkHub
repository.
Open en easel, and select the athens Canvas. And voila
Alexandre
On May 2, 2013, at 8:06 AM, Usman Bhatti <usman.bhatti(a)gmail.com> wrote:
Alex,
Really cool example.
I ask Mathieu to update the code to include all the necessary code so now it should work
without adding method by hand.
I know it might not be directly related to your example but I would like to run the
example with Athens (the one in the video) so if the instructions are not lengthy, can you
list them here? That would be beneficial for some of us who want to try Roassal with
Athens.
tx,
Usman
On Wed, May 1, 2013 at 12:54 AM, Alexandre Bergel <alexandre.bergel(a)me.com> wrote:
Matthieu, you have done an impressive piece of work.
I played a bit with it. Check out this cool video (athens based :-)
https://dl.dropboxusercontent.com/u/31543901/online/ForceBasedLayout.mov
I slightly modified the following method, by adding a "super step" :
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
ROForceBasedLayout_N>>step
"run a step of the force layout algorithm"
| from to fp tp x y len k quad old |
super step. "<<<<<<< line to add"
edges do: [ :e |
from := e from. fp := from position.
to := e to. tp := to position.
...
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Execute the following script, drag element and click on it:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
"Preambule. It includes the initialization. "
| rawView view layout |
rawView := ROView new.
view := ROMondrianViewBuilder view: rawView.
"enter your script below"
"-------------"
"-------------"
view interaction on: ROMouseEnter do: [ :n |
| nodes |
nodes := view raw elementsFromModels: n element model allSubclasses.
ROHighlightElements on: nodes ].
view interaction on: ROMouseLeave do: [ :n |
| nodes |
nodes := view raw elementsFromModels: n element model allSubclasses.
ROUnhighlightElements on: nodes ].
view interaction on: ROMouseClick do: [ :event |
layout := ROForceBasedLayout_N new.
layout fix: event element at: event element position.
layout iterationsToSendEvent: 10.
layout on: ROLayoutStep do: [ :ev | view raw signalUpdate. World
doOneCycle ].
view layout: layout.
view applyLayout ].
view shape rectangle size: 10.
view nodes: (Collection withAllSubclasses).
view edgesFrom: #superclass.
layout := ROForceBasedLayout_N new.
layout fix: (view nodes last) at: 450@450;
gravityAt: 437@38 .
view layout: layout.
"-------------"
"-------------"
"Below is the initiation of the menu and opening the visualization"
ROEaselMorphic new populateMenuOn: view.
view open
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Good job Mathieu! Continue!
Cheers,
Alexandre
On Apr 30, 2013, at 11:07 AM, stephane ducasse <stephane.ducasse(a)free.fr> wrote:
excellent!
I want to see that.
Stef
On Apr 30, 2013, at 1:28 PM, mathieubmddehouck(a)mailoo.org wrote:
Hello
I've added new features for the force based layout.
You can change the gravity center, tell where you want to see your fixed nodes and so
on.
I still have a bug with padding, and resizeStrategy, for example when you click on
Example in the view.
Gofer it
smalltalkhubUser: 'MathieuDehouck' project: 'RoassalAlgorithm';
package: 'RoassalForceBaseLayout';
load.
Try this :
---------------------------
"Preambule. It includes the initialization. "
| rawView view layout |
rawView := ROView new.
view := ROMondrianViewBuilder view: rawView.
"enter your script below"
"-------------"
"-------------"
view interaction on: ROMouseEnter do: [ :n |
| nodes |
nodes := view raw elementsFromModels: n element model allSubclasses.
ROHighlightElements on: nodes ].
view interaction on: ROMouseLeave do: [ :n |
| nodes |
nodes := view raw elementsFromModels: n element model allSubclasses.
ROUnhighlightElements on: nodes ].
view shape rectangle size: 10.
view nodes: (Collection withAllSubclasses).
view edgesFrom: #superclass.
layout := ROForceBasedLayout_N new.
layout fix: (view nodes last) at: 450@450;
gravityAt: 437@38 .
view layout: layout.
view applyLayout.
"-------------"
"-------------"
"Below is the initiation of the menu and opening the visualization"
ROEaselMorphic new populateMenuOn: view.
view open
---------------------------------------
Mathieu
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel
http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel
http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.