Hi!

This is easy. You need to create a TRMorph, plug the view in, and voila.
Here is an example:
-=-=--=-=--=-=--=-=--=-=--=-=-
| v e shape morph |
v := RTView new.
shape := RTSVGPath new path: 'M50,50.002c48.046,20.595,149.05,16.396,142.596,109.369l-36.781,37.526
C64.183,198.499,65.876,100.672,50,50.002z M236.836,314.404c46.488,35.155,202.98,145.061,202.98,145.061
c12.942,8.801,28.532-7.157,19.496-19.948c0,0-113.425-153.879-149.669-199.452c-28.634-36.068-42.95-37.333-93.729-52.295
l-33.528,34.274C198.463,272.378,200.123,286.61,236.836,314.404z M153.117,371.604l44.978-45.096
c-4.459-4.19-8.398-8.315-11.852-12.423l-45.263,45.381L153.117,371.604z M294.64,179.983l82.462-82.647l36.982,36.999
l-80.619,80.786c7.511,9.02,13.965,17.519,21.392,27.191l107.139-107.34l-84.96-84.969L261.664,165.591
C273.768,169.513,284.464,173.88,294.64,179.983z M377.672,122.197l-68.18,68.348c4.124,3.42,8.315,7.267,12.573,11.692
l67.743-67.903L377.672,122.197z M211.137,337.707l-61.792,61.927L98.214,413.8l14.149-51.147l63.117-63.268
c-6.119-10.008-10.595-20.637-14.752-32.673l-79.412,79.562L50,461.996l116.276-30.745l72.555-72.688
C221.665,346.056,221.145,345.721,211.137,337.707z'.
shape color: Color black.
shape scale: 0.1.
e := shape element.
e @ RTHighlightable.
e when: TRMouseClick do: [ self inform: 'this is your callback' ].
v add: e.
morph := TRMorph new.
morph canvas: v canvas.
morph extent: e encompassingRectangle extent.
v canvas camera focusOnCenter.

morph openInWindow.
-=-=--=-=--=-=--=-=--=-=--=-=-

Cheers,
Alexandre
-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.



On Aug 7, 2014, at 7:01 AM, Usman Bhatti <usman.bhatti@gmail.com> wrote:

Cool stuff Alex.

How do I create morphic icons (embeddable in Morphs) from these SVG icons?

usman


On Wed, Aug 6, 2014 at 3:46 AM, Alexandre Bergel <alexandre.bergel@me.com> wrote:
Hi!

We fixed some bugs in the way path were rendered. Path can now be scaled and answer properly to events.
You can register callbacks or other kind of interaction you wish.

Here is a screenshot:

<Screen Shot 2014-08-05 at 9.27.01 PM.png>

This code is available from:  RTRoassalExample>>exampleSVGPath

Icons have been obtained from http://iconmonstr.com

Thanks Juraj of the improvement you’ve made to TRSVGPath !

Cheers,
Alexandre
-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




_______________________________________________
Moose-dev mailing list
Moose-dev@iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
Moose-dev@iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev