From 9c02dc748f9f8d3065d309febba296369aed10bf Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Thu, 2 May 2013 19:21:22 -0700 Subject: [PATCH] Add CGFont::wrap_owned --- font.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/font.rs b/font.rs index dc86609..60e2deb 100644 --- a/font.rs +++ b/font.rs @@ -31,6 +31,13 @@ pub struct CGFont { } impl CGFont { + /// Convenience method to make it easier to wrap external `CGFont` instances. + pub fn wrap_owned(font: CGFontRef) -> CGFont { + CGFont { + contents: CFWrapper::wrap_owned(font) + } + } + /// Convenience method to make it easier to wrap external `CGFont` instances. pub fn wrap_shared(font: CGFontRef) -> CGFont { CGFont {