[Fun] SVG snippet

Load XMLParser from catalog and load Athens-SVG from the Pharo/Athens repository
xmlDoc := XMLDOMParser parseUrl: ‘https://s.cdpn.io/3/kiwi.svg‘.
svg := AthensSVGConverter new importXMLDocument: xmlDoc.
svg transform: ‘scale(0.5)’.
surface := AthensCairoSurface extent: 500 @ 500.
surface drawDuring: [ :aCanvas | svg renderOn: aCanvas ].
surface asForm.

Screen Shot 2017-10-06 at 17.20.39

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: