SVG Icon in Roassal2

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

SVG Icon in Roassal2

abergel
Hi!

Just to keep you updated with the excellent work Sergio Maas did with Roassal 2.

Roassal2 now support SVG path. The cool thing about it, is that the web is stuffed with really nice looking icon (e.g., http://iconmonstr.com). We can now embed these icons in any visualization. 

As an example, consider this:

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
| v shape |
v := RTView new.
shape := RTSVGPath new path: 'M442.264,283.033l-90.66,52.343l28.787,16.621c-28.083,38.277-64.824,62.301-104.362,68.397V231.153

c0-54.82,48.786-60.084,48.786-112.339C324.814,80.869,293.944,50,256,50c-37.943,0-68.814,30.869-68.814,68.814

c0,52.694,48.786,57.052,48.786,112.338v189.242c-39.538-6.097-76.278-30.12-104.363-68.397l28.788-16.621l-90.66-52.343v104.686

l27.018-15.6C137.32,429.445,194.595,462,256,462s118.68-32.555,159.246-89.881l27.018,15.6V283.033z M227.242,118.814

c0-15.857,12.9-28.758,28.758-28.758c15.856,0,28.758,12.9,28.758,28.758c0,15.856-12.901,28.757-28.758,28.757

C240.143,147.571,227.242,134.671,227.242,118.814z'.
shape fillColor: Color red.
shape scale: [:vv | vv model ].
v add: ((shape elementsOn: #(0.1 0.2 0.3 0.4) ) @ RTPopup).

v open
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Cheers,
Alexandre

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




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: SVG Icon in Roassal2

Stéphane Ducasse
Alexandre

Would it be possible to get a ROPath out of an SVGPath because SVG is just one format.
Do not pollute Roassal model with that.

> | v shape |
> v := RTView new.
> shape := (RTSVGPathImporter new path: 'M442.264,283.033l-90.66,52.343l’) path.
> shape fillColor: Color red.
> shape scale: [:vv | vv model ].
> v add: ((shape elementsOn: #(0.1 0.2 0.3 0.4) ) @ RTPopup).
>
> v open

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev