{"id":171,"date":"2012-10-06T19:50:03","date_gmt":"2012-10-07T03:50:03","guid":{"rendered":"http:\/\/blog.danielparnell.com\/?p=171"},"modified":"2012-10-06T19:50:03","modified_gmt":"2012-10-07T03:50:03","slug":"svg","status":"publish","type":"post","link":"https:\/\/blog.danielparnell.com\/?p=171","title":{"rendered":"SVG"},"content":{"rendered":"<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\" style=\"word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; \">I&#8217;ve been looking into making some software with my daughter. &nbsp;She wants to make a game with some characters she has drawn, so I need a nice way to render them. &nbsp;I want to make them using vector graphics, but iOS doesn&#8217;t really have a nice way of doing that. &nbsp;What I am in the process of doing is making a little command line tool that converts <a href=\"http:\/\/en.wikipedia.org\/wiki\/Scalable_Vector_Graphics\">SVG<\/a> files into <a href=\"http:\/\/developer.apple.com\/library\/ios\/#documentation\/coregraphics\/reference\/coregraphics_framework\/_index.html\">CoreGraphics<\/a> calls.<\/p>\n<div>The code can be found <a href=\"https:\/\/github.com\/dparnell\/SVG2ObjC\">here<\/a>&nbsp;on github<\/div>\n<div><\/div>\n<div><A href=\"\/wp-content\/uploads\/20121007144954_orig_Screen%2520Shot%25202012-10-01%2520at%25208.56.21%2520AM.png\"><img loading=\"lazy\" decoding=\"async\" src=\"\/wp-content\/uploads\/20121007144954_Screen%2520Shot%25202012-10-01%2520at%25208.56.21%2520AM.jpg\" width=\"320\" height=\"180\" border=\"0\" \/><\/A><\/div>\n<div><\/div>\n<div>This is a sample of the output of the tool. &nbsp;I have seen several other tools that convert the SVG paths to CoreGraphics calls, but nothing that will actually render the whole file including colours and fills. &nbsp;It is still very rough and doesn&#8217;t handle things like gradient fills, but for a quick hack it is working pretty well.<\/div>\n<div><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve been looking into making some software with my daughter. &nbsp;She wants to make a game with some characters she has drawn, so I need a nice way to render them. &nbsp;I want to make them using vector graphics, but iOS doesn&#8217;t really have a nice way of doing that. &nbsp;What I am in the &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/blog.danielparnell.com\/?p=171\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;SVG&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[1],"tags":[],"class_list":["post-171","post","type-post","status-publish","format-standard","hentry","category-uncategorized","entry"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/s561S3-svg","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/blog.danielparnell.com\/index.php?rest_route=\/wp\/v2\/posts\/171","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.danielparnell.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.danielparnell.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.danielparnell.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.danielparnell.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=171"}],"version-history":[{"count":1,"href":"https:\/\/blog.danielparnell.com\/index.php?rest_route=\/wp\/v2\/posts\/171\/revisions"}],"predecessor-version":[{"id":172,"href":"https:\/\/blog.danielparnell.com\/index.php?rest_route=\/wp\/v2\/posts\/171\/revisions\/172"}],"wp:attachment":[{"href":"https:\/\/blog.danielparnell.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=171"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.danielparnell.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=171"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.danielparnell.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=171"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}