<div dir="ltr">When you say, output to Swift, do you mean, call it from Swift? Return the PNG or surface to Swift?</div><br><div class="gmail_quote"><div dir="ltr">On Thu, 10 Dec 2015 at 22:39 Gage Morgan via swift-users &lt;<a href="mailto:swift-users@swift.org">swift-users@swift.org</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div><div dir="ltr">So, if I had this code written in C:<div><br></div><div><pre style="font-family:mono;margin-left:124.281px;margin-right:124.281px;border:1px solid rgb(197,197,246);padding:0.5em;font-size:medium;background-color:rgb(219,219,247)"><code>int
main (int argc, char *argv[])
{
        cairo_surface_t *surface =
            cairo_image_surface_create (CAIRO_FORMAT_ARGB32, 240, 80);
        cairo_t *cr =
            cairo_create (surface);

        cairo_select_font_face (cr, &quot;serif&quot;, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD);
        cairo_set_font_size (cr, 32.0);
        cairo_set_source_rgb (cr, 0.0, 0.0, 1.0);
        cairo_move_to (cr, 10.0, 50.0);
        cairo_show_text (cr, &quot;Hello, world&quot;);

        cairo_destroy (cr);
        cairo_surface_write_to_png (surface, &quot;hello.png&quot;);
        cairo_surface_destroy (surface);
        return 0;
}</code></pre></div><div><br></div><div>how would I output to Swift? If I can get one or two examples, I&#39;ll be closer to finished with using Cairo in Swift.</div><div><br></div>                                               </div>
<img src="https://u2002410.ct.sendgrid.net/wf/open?upn=kKLYQ91ZFOe6ryzRU3CXyiq4yOweT6LjPwa6z8Qwa5fRJQvehCW7UCK-2BbJEgYqk9ymhv1Wllv6abHreSdhPig42FLfYVbgr7JKJ7hY1Q7iq3tkkkIpLj1sxjm0TOLD4CC06I9rFJKGqidW9EjUhQCrGd33ergA7MqltYs6YCP9DldpA78aN2AZ7es5uc68BVL57Z7AvFLHnyE3-2BiYRej3Eg-2BkjZ9JyB4s-2F4sOp6rJ8M-3D" alt="" width="1" height="1" border="0" style="min-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">
</div>

_______________________________________________<br>
swift-users mailing list<br>
<a href="mailto:swift-users@swift.org" target="_blank">swift-users@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-users" rel="noreferrer" target="_blank">https://lists.swift.org/mailman/listinfo/swift-users</a><br>
</blockquote></div>