<br><div><span class="gmail_quote">On 5/26/05, <b class="gmail_sendername">Bill Spitzak</b> <<a href="mailto:spitzak@d2.com">spitzak@d2.com</a>> wrote:</span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>As soon as your wrapper requires virtual functions, you will start<br>making code that only takes your wrapper, rather than a cairo_t, as an
<br>argument. This is VERY bad. The big deal with Cairo is not antialiased<br>graphics. The big deal is that there is a hope that portable drawing<br>functions will be possible, where the only argument is a cairo_t, and<br>
they will work in Qt widgets and GTK widgets and GTK canvas objects and<br>in a raw XCB or Xlib program, or in a Windows .net program. If you put<br>virtual functions around this you will completely kill this idea and<br>
that would be very bad.<br></blockquote></div><br>
I'm not suggesting something like Gtk# should return an object derived
from the Graphics object, or the Cairo bindings themselves. The reason
the object would have virtual functions is so an application can
override them itself. For instance, overriding the Save and Restore
calls would allow an application to preserve extra state information.
This can of course be achieved without virtual functions, and just
calling the functions something else - but having virtual functions
adds to the flexibility and clarity of the api. Neither is this a bug
in Cairo since it cannot be aware of what the programmer wants to
achieve in overriding these calls.<br>
<br>
<br>