On 20 Sep 2008, at 19:50, Fabien Costantini wrote:

> Thanks Ian for the info :)
>
>> #include <cairo.h>
> Not needed all plafform dependent cairo-xxx.h includes already  
> include it, won't be a problem anyway, just useless

Indeed so, but I like to include it anyway - sort of a "headline" to  
remind me (or others) looking at the code that it will depend on  
Cairo...


> here.
> ./..
>> void test_box::set_cairo_cxt(int wo, int ho) {
>> #ifdef WIN32
>> #warning win32 mode
>>      /* Get a Cairo surface for the current DC */
>>      HDC dc = fl_gc;         /* Exported by fltk */
>>      surface = cairo_win32_surface_create(dc);
> Here's a little tip: you can destroy the surface just after  
> creating the cairo_t context, that's quite convenient if you happen  
> encapsulate all that terrible cairo initialization mess.

OK - useful to know.
I wasn't too bothered either way here, as I seem to need to recreate  
the context when the window resizes anyway, so I'm not keeping the  
context for any length of time either...

-- 
Ian


_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to