Hey,
A patch to add Cairo.Graphics.TextExtents ()
Index: Mono.Cairo/Cairo.cs
===================================================================
--- Mono.Cairo/Cairo.cs (revision 49950)
+++ Mono.Cairo/Cairo.cs (working copy)
@@ -238,7 +238,7 @@
public static extern void cairo_text_path (IntPtr ct, string utf8);
[DllImport (CairoImp)]
- public static extern void cairo_text_path (IntPtr ct, string utf8, ref TextExtents extents);
+ public static extern void cairo_text_extents (IntPtr cr, string utf8, ref TextExtents extents);
[DllImport (CairoImp)]
public static extern void cairo_glyph_path (IntPtr ct, IntPtr glyphs, int num_glyphs);
Index: Mono.Cairo/Graphics.cs
===================================================================
--- Mono.Cairo/Graphics.cs (revision 49950)
+++ Mono.Cairo/Graphics.cs (working copy)
@@ -647,5 +647,12 @@
{
CairoAPI.cairo_text_path (state, str);
}
+
+ public TextExtents TextExtents (string utf8)
+ {
+ TextExtents extents = new TextExtents ();
+ CairoAPI.cairo_text_extents (state, utf8, ref extents);
+ return extents;
+ }
}
}
Index: ChangeLog
===================================================================
--- ChangeLog (revision 49950)
+++ ChangeLog (working copy)
@@ -1,3 +1,8 @@
+2005-09-12 John Luke <[EMAIL PROTECTED]>
+
+ * Mono.Cairo/Cairo.cs: add cairo_text_extents
+ * Mono.Cairo/Graphics.cs: add TextExtents ()
+
2005-09-07 John Luke <[EMAIL PROTECTED]>
* Mono.Cairo/Graphics.cs: the Relative path methods
_______________________________________________
Mono-devel-list mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/mono-devel-list