Thanks Peter!
That was the starting point I was looking for.
Cheers,
Offray
El 18/03/15 a las 02:52, Peter Uhnák escribió:
Hi,
There is a RTNameCloud class that you can use for tag clouds. There is also
couple of examples.
1. Put a tag cloud with some layout/form (for example around an object).
Right now RTNameCloud uses RTRectanglePackLayout which doesn't allow you to
"fix" elements in place, so this would have to be rewritten/modified, or some
other workaround.
Or you can plug your own layouting into RTNameCloud.
2. Put a raster image (the avatar) in the center of that tag cloud.
As for raster image, there is RTBitmap, as for the placing see answer above.
3. Exclude some words from the tag cloud.
Not right now. You would have to extend it. Look at RTNameCloud>>addWord: and
addString: methods.
Also if you add an extra object, the builder only layouts its own stuff, so a
crude example may be
=============================
| b url form |
b := RTNameCloud new
addString: 'open
| v shape |
v := RTView new.
shape := RTLabel new height: [ :assoc | assoc value ]; text: #key.
v addAll: (shape elementsOn: table associations).
RTFlowLayout on: v elements.
v open'.
b build.
url := 'http://www.gravatar.com/avatar/da33a5de07879db5ea0d55be9f875932?s=100'.
"<-- the layouting is based on sizes, so if you change ?s=100 to ?s=40 the image
will be center-ish"
url asZnUrl.
form := ZnEasy getJpeg: url.
b view add: (RTBitmap new form: form) element.
RTRectanglePackLayout new on: b view elements. "<-- since I added a new element
I have to layout it myself"
^ b view
=============================
Peter
I will be making my explorations tonight and tomorrow morning, but any
pointer in the right direction will be greatly appreciated.
Cheers,
Offray
_________________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch <mailto:Moose-dev@iam.unibe.ch>
https://www.iam.unibe.ch/__mailman/listinfo/moose-dev
<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