[cairo] FW: Questions about Cairo and Windows

Lucan1d Beetle lucan1d at hotmail.com
Fri Oct 1 07:47:51 PDT 2010




Hi Maarten,
 
Thanks very much for your reply.  Comments inline.
 
> Although its primary developers mainly run Cairo on Linux (more
> specifically: on intel graphics) there are enough people interested in
> running it on Windows to keep it in good shape.
> But of course Cairo isn't part of the core infrastructure on Windows,
> so you might run into a bug yourself if you use the latest version.

I am glad that it's a branch with some validity.  IMHO there is a real need for a truly cross-platform 2D graphics library written in C.
 
> Yes, it can be build on Windows, either using MSVC or through
> GCC+mingw32. Personally I find the easiest option to be
> cross-compiling on Linux using mingw.

Why is it easier to build Cairo using MinGW on Linux than Windows?
 
> I myself have switched to downloading the packages from the OpenSuse
> BuildService. The mingw project over there has a lot of nice packeges
> being automatically build for Windows. See for example:
> https://build.opensuse.org/package/show?package=mingw32-cairo&project=windows%3Amingw%3Awin32
> I only compile stuff like Cairo and Gtk myself in order to fix bugs.
> For distribution with my Windows app, I only rely on the binaries from
> the BuildService.

OK, you may have to help me here!  I had a look at that page but I am a bit lost as to how to get from it to a download of the latest Cairo binaries for Windows.  Can you give me a hint?
 
> Yep. Although I think there isn't a MSVC project to build it, but you
> have to use a special makefile. But as I have no experience building
> this way, better let some else answer this in more detail.

If I get it to work with Visual Studio I will contribute the project file.
 
> As you can see in the docs:
> http://cairographics.org/manual/cairo-Win32-Surfaces.html
> Cairo needs a HDC in order to be able to draw to a window.

Right, that should be fine.
 
> The main thing I would say is that there aren't that much developers
> using Cairo on Windows. That said, it works great on Windows and I
> would really recommend you to use Cairo. If you submit patches for any
> problems you might experience, that's even better!

Certainly will do!
 
> One other thing is the performance of the win32 backend. It is
> certainly sufficient (at least for my app), but I find that using the
> image surface for drawing and then blitting the contents to the win32
> surface is much faster. It's a trivial change code-wise, so you can
> try and profile both to see whether performance is acceptable for you.

That's my usual coding style coming from a history of using other graphics toolkits so that is what I expected to do anyway.
 
Thanks again,
 
-Lucan1d-
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cairographics.org/archives/cairo/attachments/20101002/5f02eda3/attachment-0001.htm>


More information about the cairo mailing list