[cairo] Rel. 1.12 - quartz surface on IOS

Andrea Canciani ranma42 at gmail.com
Thu Mar 29 01:42:33 PDT 2012


On Thu, Mar 29, 2012 at 12:30 AM, cu <cairouser at yahoo.com> wrote:
> First, thank you for updating Quartz surface to use "blend mode" and
> removing references to "SetCTM".

This is intentional, I was aiming at removing all the calls to private API.

>
> - Blend modes are turned on based on compile-time define
> __MAC_OS_X_VERSION_MIN_REQUIRED
>  This is not available on IOS. Blend modes are available on all
> versions of IOS (and, on the other hand, using private composite mode
> API is against appstore rules)
>  Would be great if the condition was updated to include IOS (i.e. #if
> __MAC_OS_X_VERSION_MIN_REQUIRED || _IOS_WHATEVER_ )
>
> - To build Quartz surface on IOS, includes in cairo-quartz.h need to be
> changed to:
> #include <QuartzCore/QuartzCore.h>
> #include <CoreGraphics/CoreGraphics.h>
> #include <CoreGraphics/CGContext.h>
>
> - There are two test functions to read/write Quartz bitmap surface to
> PNG file. I wonder if it may be possible to expose those through the
> official API?

They depend on QT, so they would not be very useful for the generic
user (actually AFAIK nobody is using them anymore, so we could
probably just remove them).

You can already read/write PNG images with the toy PNG API:
http://cairographics.org/manual/cairo-PNG-Support.html
cairo_surface_write_to_png() should work just fine on quartz surfaces.
In order to read a PNG to a Quartz image you will have to read it as
image and paint it on the Quartz surface.

>
> While it's not a big deal to edit a few files before building for IOS,
> having this in official source code would definitely help.

Sorry, I don't have much time to work on this (I'm quite busy with
other things right now and I'm trying to use my cairo-time to fix
quartz... as you might have noticed 1.12 shipped with multiple crashes
in the test suite).
Could you add a build guide for iOS to the wiki?
I will install the iOS SDK and try to build Cairo for iOS if you can
provide me with some guidance on how to do that (what about pixman?).
This should make it possible for me to test the changes you've
suggested and to check if any other fixes are needed in future.

Thank you for your reports, I will keep an eye on them

Andrea

>
> --
> cairo mailing list
> cairo at cairographics.org
> http://lists.cairographics.org/mailman/listinfo/cairo


More information about the cairo mailing list