<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Gage,<div class=""><br class=""></div><div class="">Sorry, I just got back from class.</div><div class=""><br class=""></div><div class="">I’ll respond in line!</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Dec 11, 2015, at 5:09 PM, Gage Morgan &lt;<a href="mailto:gagemorgan@outlook.com" class="">gagemorgan@outlook.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class="">

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" class="">

<div class="">
<div class="">Harlan,</div>
<div class=""><br class="">
</div>
<div class="">I read on <a dir="ltr" href="http://cairographics.org/" x-apple-data-detectors="true" x-apple-data-detectors-type="link" x-apple-data-detectors-result="0" class="">
cairographics.org</a> about bindings awhile back. I think they want cairo, not surface, so we would have something like:</div>
<div class=""><br class="">
</div>
<div class="">let cairo = Surface(format: CAIRO_FORMAT_ARGB32, width: 240, height: 80)</div>
<div class="">cairo.setFontFace("serif", weight: CAIRO_FONT_WEIGHT_BOLD)</div>
<div class="">cairo.setFontSize(32.0)</div>
<div class="">cairo.setSourceRGB(0.0, g: 0.0, b: 1.0)</div>
<div class="">cairo.moveTo(x: 10, y: 50)</div>
<div class="">cairo.showText("Hello, World!")</div>
<div class="">cairo.writeToPNG("hello.png")</div>
<div class=""><br class="">
</div>
<div class="">Would this work the same as before without "surface" but instead "cairo”?<br class=""></div></div></div></blockquote><div><br class=""></div><div>Absolutely! That’s just a variable name — it could be called ‘puppies’, though that’s not very readable.</div><br class=""><blockquote type="cite" class=""><div class=""><div class=""><div class="">
<br class="">
<div class="acompli_signature">Sent from <a href="https://aka.ms/qtex0l" class="">Outlook Mobile</a></div>
<br class="">
</div>
<br class="">
<br class="">
<br class="">
<div class="gmail_quote">On Fri, Dec 11, 2015 at 2:00 PM -0800, "Gage Morgan via swift-users"
<span dir="ltr" class="">&lt;<a href="mailto:swift-users@swift.org" target="_blank" class="">swift-users@swift.org</a>&gt;</span> wrote:<br class="">
<br class="">
</div>
<div class="">
<div class="">I went and looked at it, and even now it looks like I want to take every function I've used in Cairo and translate it to Swift. Swift is such a...simple language compared to everything else. That being said, as a result of the specs, it is also much more
 verbose in terms of writing the code. Compared to other languages, it is written out instead of shoved onto a few lines.&nbsp;</div>
<div class=""><br class="">
</div>
<div class="">Is there a way to import modules into other modules? Because it looks like a weekend project that will eventually get posted by myself at <a href="http://github.com/Christoffen-Corporation" class="">http://github.com/Christoffen-Corporation</a>.&nbsp;<br class="">
<br class="">
<div class="x_acompli_signature">Sent from <a href="https://aka.ms/qtex0l" class="">Outlook Mobile</a></div></div></div></div></div></blockquote><div><br class=""></div><div>I’d recommend having a look at the Swift package manager example again —&nbsp;<a href="https://github.com/apple/swift-package-manager/blob/master/Documentation/SystemModules.md" class="">https://github.com/apple/swift-package-manager/blob/master/Documentation/SystemModules.md</a></div><div><br class=""></div><div>There’s an example of using those modules together.</div><br class=""><blockquote type="cite" class=""><div class=""><div class=""><div class="">
<br class="">
<div class="x_gmail_quote">On Fri, Dec 11, 2015 at 1:52 PM -0800, "Gage Morgan via swift-users"
<span dir="ltr" class="">&lt;<a href="mailto:swift-users@swift.org" target="_blank" class="">swift-users@swift.org</a>&gt;</span> wrote:<br class="">
<br class="">
</div>
<div class="">
<div class="">I meant the code posted in the Gist link above. I don't know jack squat about qsort. I'm hoping that if I can reverse-engineer code already produced, I can apply it to other parts of Cairo.&nbsp;<br class="">
<br class="">
<div class="x_x_acompli_signature">Sent from <a href="https://aka.ms/qtex0l" class="">Outlook Mobile</a></div></div></div></div></div></div></blockquote><div><br class=""></div><div>I’ll go ahead and comment it, but I think it’s simplistic enough that it should be readable with a grasp of some Swift concepts. Perhaps it’s a good idea to look through The Swift Programming Language to figure out some of the constructs I used — they’re fairly basic constructs.</div><br class=""><blockquote type="cite" class=""><div class=""><div class=""><div class=""><div class="">
<br class="">
<div class="x_x_gmail_quote">On Fri, Dec 11, 2015 at 1:34 PM -0800, "Kwame Bryan"
<span dir="ltr" class="">&lt;<a href="mailto:kwame.bryan@gmail.com" target="_blank" class="">kwame.bryan@gmail.com</a>&gt;</span> wrote:<br class="">
<br class="">
</div>
<div class="" style="word-wrap:break-word">Tutorial on the subject.&nbsp;<a href="http://chris.eidhof.nl/posts/swift-c-interop.html" class="">http://chris.eidhof.nl/posts/swift-c-interop.html</a>&nbsp;
<div class=""><br class="">
</div>
<div class="">Regards</div>
<div class="">Kwame</div>
</div>
<img src="https://u2002410.ct.sendgrid.net/wf/open?upn=-2FcgwiRAxmHDdptrhrsAJKMBtNqQpWV-2BwUfjpvH9AIapmo3-2BHsnvTus94jzsAd9QbgrzJUOBMUGL1vbZcJzhtyVp8DdIXzqymeEFv78CU98Vyvkel-2BZ9jAScwY1YDPFzrfK4k0wzAL0RYvODDsxuakhZXZY7WUvtIDD6jT8hO1G12IjFAP4zcPGisA85WWuoE0N2vgQ90Wpd69-2B1PAy-2FgJ6kuPbhfqVCSq9RdDYqcqzU-3D" alt="" width="1" height="1" border="0" style="height:1px!important; width:1px!important; border-width:0!important; margin-top:0!important; margin-bottom:0!important; margin-right:0!important; margin-left:0!important; padding-top:0!important; padding-bottom:0!important; padding-right:0!important; padding-left:0!important" class="">
</div>
<img src="https://u2002410.ct.sendgrid.net/wf/open?upn=-2FcgwiRAxmHDdptrhrsAJKMBtNqQpWV-2BwUfjpvH9AIapEPR-2FCXY9amYXSxN3Pbi2XrZMfHEN794BjyOKzqKEN1I5HM69Lqapv6DjsA6FzE8d9q3N3v71RBohhpxfFJmwu-2FppXm9-2F5fp7k5-2B6DDHtFIR52wVygcHpVKdRV8liNPtLvkthJRTxyuxSppBSc-2BI5r-2B9L8DyZNdiOAXPmJzd91Fd8lk3drIZ4JVKfkyoAcyrw-3D" alt="" width="1" height="1" border="0" style="height:1px!important; width:1px!important; border-width:0!important; margin-top:0!important; margin-bottom:0!important; margin-right:0!important; margin-left:0!important; padding-top:0!important; padding-bottom:0!important; padding-right:0!important; padding-left:0!important" class="">
</div>
</div>

<span id="cid:CAD42AA7-159A-44FE-8B20-00668767F2BB@student.rit.edu.">&lt;Mail Attachment.txt&gt;</span><span id="cid:0E99C342-6109-49EF-9D11-9ADA11D25B61@student.rit.edu.">&lt;Mail Attachment.txt&gt;</span></div></blockquote></div><br class=""></div></body></html>