<div>Hi,</div><div><br></div><div>I am using cairo on Windows (to create metafiles) and found only one gotcha so far (that relates to metafiles specifically). A stock DLL should be OK for most use.</div><div><br></div><div>
@Maarten: you said you cross-compile cairo for Windows from a Linux machine. Do you also include windows.h from somewhere? (Right now I can cross-compile, but not with win32 support.)</div><div><br></div><div>Zoltan</div>
<br><div class="gmail_quote">2010/10/1 Maarten Bosmans <span dir="ltr"><<a href="mailto:mkbosmans@gmail.com">mkbosmans@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
2010/10/1 Lucan1d Beetle <<a href="mailto:lucan1d@hotmail.com">lucan1d@hotmail.com</a>>:<br>
<div class="im">> I am looking for a 2D graphics toolkit for a new large project and Cairo is<br>
> looking promising but one of the requirements I have is that the software<br>
> runs well on Windows 7 so I would appreciate answers to the following<br>
> questions:<br>
><br>
><br>
> Does Cairo run as well on Windows as it does on other platforms (i.e.<br>
> Linux)?<br>
<br>
</div>Although its primary developers mainly run Cairo on Linux (more<br>
specifically: on intel graphics) there are enough people interested in<br>
running it on Windows to keep it in good shape.<br>
But of course Cairo isn't part of the core infrastructure on Windows,<br>
so you might run into a bug yourself if you use the latest version.<br>
<div class="im"><br>
> Can I build Cairo on Windows or do I have to wait for GTK or someone else to<br>
> build the latest version and release the binaries?<br>
<br>
</div>Yes, it can be build on Windows, either using MSVC or through<br>
GCC+mingw32. Personally I find the easiest option to be<br>
cross-compiling on Linux using mingw.<br>
<br>
I myself have switched to downloading the packages from the OpenSuse<br>
BuildService. The mingw project over there has a lot of nice packeges<br>
being automatically build for Windows. See for example:<br>
<a href="https://build.opensuse.org/package/show?package=mingw32-cairo&project=windows%3Amingw%3Awin32" target="_blank">https://build.opensuse.org/package/show?package=mingw32-cairo&project=windows%3Amingw%3Awin32</a><br>
I only compile stuff like Cairo and Gtk myself in order to fix bugs.<br>
For distribution with my Windows app, I only rely on the binaries from<br>
the BuildService.<br>
<div class="im"><br>
> Can Cairo be built using Visual Studio 2010 or be built in such a way that<br>
> the resulting library works well with code built using Visual Studio 2010?<br>
<br>
</div>Yep. Although I think there isn't a MSVC project to build it, but you<br>
have to use a special makefile. But as I have no experience building<br>
this way, better let some else answer this in more detail.<br>
<div class="im"><br>
> In which Windows contexts/containers/frames can Cairo run such as Win32, MFC<br>
> or WPF?<br>
<br>
</div>As you can see in the docs:<br>
<a href="http://cairographics.org/manual/cairo-Win32-Surfaces.html" target="_blank">http://cairographics.org/manual/cairo-Win32-Surfaces.html</a><br>
Cairo needs a HDC in order to be able to draw to a window.<br>
<div class="im"><br>
> Are there any known issues, limitations or "gotchas" related to running<br>
> Cairo on Windows?<br>
<br>
</div>The main thing I would say is that there aren't that much developers<br>
using Cairo on Windows. That said, it works great on Windows and I<br>
would really recommend you to use Cairo. If you submit patches for any<br>
problems you might experience, that's even better!<br>
<br>
One other thing is the performance of the win32 backend. It is<br>
certainly sufficient (at least for my app), but I find that using the<br>
image surface for drawing and then blitting the contents to the win32<br>
surface is much faster. It's a trivial change code-wise, so you can<br>
try and profile both to see whether performance is acceptable for you.<br>
<br>
><br>
> Thanks,<br>
><br>
> -Lucan1d-<br>
<br>
Maarten<br>
<font color="#888888">--<br>
cairo mailing list<br>
<a href="mailto:cairo@cairographics.org">cairo@cairographics.org</a><br>
<a href="http://lists.cairographics.org/mailman/listinfo/cairo" target="_blank">http://lists.cairographics.org/mailman/listinfo/cairo</a><br>
</font></blockquote></div><br>