[Mono-winforms-list] allow using installed cairo in libgdiplus

Peter Dennis Bartok peter at novonyx.com
Sat Jul 8 19:02:58 EDT 2006


John,

Using a statically linked version of cairo has helped us avoid many problems 
we've had in the past, related to wrong versions of cairo, dependency 
issues, etc. I avoids a cairo dependency on our libgdiplus package, and lets 
people use System.Drawing/WinForms without having to get other 3rd party 
stuff first.

If you're just worried about moving to 1.2, I do have a 1.2 update almost 
ready to check in, it should go into svn on Monday or Tuesday.

Cheers,
  Peter

-----Original Message-----
From: "John Luke" <john.luke at gmail.com>
To: <mono-winforms-list at lists.ximian.com>
Date: Saturday, 08 July, 2006 16:25
Subject: [Mono-winforms-list] allow using installed cairo in libgdiplus


>Hello,
>
>I wanted to see if I could make libgdiplus work with my installed
>version of cairo instead of the included one.  The attached is what I
>came up with and it seems to work ok.  There is currently one use of
>pixman in a few places and one use of cairo_ps_ api that was changed in
>the 1.2.0 release that prevent it from compiling against the released
>cairo 1.2.
>
>The use of pixman_bits_t seems to come from this:
>http://galactus.ximian.com/pipermail/mono-winforms-list/2005-February/001439.html
>but shouldn't it be 4 even on 64-bit machines?
>If not can we substitute a suitable glib type there?
>
>Here is the relevant part of pixman.h:
>/*
>* This single define controls the basic size of data manipulated
>* by this software; it must be log2(sizeof (pixman_bits_t) * 8)
>*/
>
>/* We use a 32-bit size on all platforms, (even those with native 64
>* bit types). This is consistent with the code currently in the X
>* server, so it goes through much more well-tested code paths, (we
>* saw rendering bugs when we tried IC_SHIFT==6 and uint64_t for
>* pixman_bits_t on 64-bit platofrms). In addition, Keith says that
>* his testing indicates that using 32-bits everywhere is a
>* performance win in any case, (presumably due to 32-bit datapaths
>* between the processor and the video card).
>*/
>#ifndef IC_SHIFT
>#define IC_SHIFT 5
>#define FB_SHIFT IC_SHIFT
>typedef uint32_t pixman_bits_t;
>#endif
> 



More information about the Mono-winforms-list mailing list