Great !<br>
<br>
The coding style seems similar to the one I was thinking of using. With
the exception of the capitalization in first letter of the methods (but
that's only small details).<br>
<br>
By the way, another thing that I tough of was the possibility to have
automatic status checks (after any operation that might fail) and react
to that failure by (optionaly) throwing an exception.<br>
I think this is a good idea, but as I don't have too much experience
using cairo i'm still unsure. It's certainly a better way of checking
for error conditions, but cairo seems to be able to keep going even if
certain errors occurs (say, cairo_create() is called when
cairo_status()==<code class="literal">CAIRO_STATUS_NO_MEMORY</code>).<br>
This could eventualy be made in a way it was possible to disable the
checks with a #define or with a simple bool in the wrapper class.<br>
What do you think of this ?<br>
<br>
If you need any help, just ask.<br>
Cheers,<br>
<br>
Rui Pires.<br>
<br><br><div><span class="gmail_quote">On 9/21/05, <b class="gmail_sendername">Evan Martin</b> <<a href="mailto:martine@danga.com">martine@danga.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I've been doing exactly this. I should put this code up somewhere.<br>It's currently just a 283-line header file that does the obvious<br>wrapping. Here's a snippet of some code that uses it. (I apologize<br>for the coding style, but it's trying to match another project.)
<br><br>// ... a function that takes a cairo::Context &cr, and then:<br> cr.SelectFontFace("sans");<br> cr.SetFontSize(12.0);<br><br> cairo::TextExtents te;<br> // center the title.<br> cr.GetTextExtents
(*title_, &te);<br> cr.MoveTo(Point((cairo_width_ - te.width) / 2.0, -20));<br> cr.ShowText(*title_);<br><br>On 9/19/05, Rui Pires <<a href="mailto:themidgard@gmail.com">themidgard@gmail.com</a>> wrote:<br>
> Hi,<br>><br>> I'm quite interested in cairoxx, as i'm a C++ fan.<br>> It's sad that there are already bindings available for a bunch of other<br>> languages and not for C++. It's true that in C++ you can use the C API
<br>> directly, but it's not the same thing. For me it just doesn't feel right<br>> using it that way.<br>><br>> Anyway, i've checked the mailing list archives didn't find out if this is<br>> being actively developed or if it is stopped. Also, at the time i write
<br>> this, the last CVS checkin seems to have been 16 months ago.<br>><br>> If anyone's interested i'm willing to try writing a really thin set of<br>> wrapper classes (mostly inline functions, to keep overhead at a mininum).
<br>><br>><br>> Rui Pires.<br>><br>> _______________________________________________<br>> cairo mailing list<br>> <a href="mailto:cairo@cairographics.org">cairo@cairographics.org</a><br>> <a href="http://cairographics.org/cgi-bin/mailman/listinfo/cairo">
http://cairographics.org/cgi-bin/mailman/listinfo/cairo</a><br>><br>><br></blockquote></div><br>