gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Discussing Opal which implements Quartz on top of Cairo (was Re: google


From: Quentin Mathé
Subject: Discussing Opal which implements Quartz on top of Cairo (was Re: google summer of code)
Date: Wed, 17 May 2006 00:54:36 +0200

Le 15 mai 06 à 04:06, BALATON Zoltan a écrit :

On Fri, 28 Apr 2006, Quentin Mathé wrote:

Le 23 avr. 06 à 00:31, BALATON Zoltan a écrit :
- Implement the CoreGraphics API on top of Cairo (this brings a common
 base for the Cairo backend, PDFKit and viewer tasks above)

I don't have a sufficient knowledge of Cairo and CoreGraphics to know whether this is possible easily or not.

I started to experiment with it and it turned out that a large part of it is not only possible but also fairly simple. I now have a preliminary version which supports most of vector drawing operations and basic ShowText operations.

That looks quite exciting. I can think of two possible interesting uses right now. First one would be the possibility to compile Camino in straight forward way (thanks to GCC 4.1 and Nib compatibility work done by Gregory Casamento), they were in process of rewriting the code used by their web view from QuickDraw to Quartz, it might be not yet finished (I didn't check recently). The other one would a comprehensive Quartz backend for GNUstep, allowing to bypass the X11 barrier/dependency.

Currently implemented are:
- CGAffineTransform, CGGeometry: reused from base/gui with some
  optimisations

I suppose that means you are calling base/gui code from Opal ?… or perhaps you just copied the code and reworked it.

- CGContext: CTM, Save/Restore GState, set line parameters, path
  constructing and drawing, filling and clipping and basic text works

ok

- CGColorSpace, CGColor: RGB and Gray color spaces supported without color
  management (I have further ideas on how to improve it)

Do you mean you have plans to extend GNUstep with color management support ?

- CGFont: Enough to get fonts from Fontconfig for CGContextSelectFont

Is there any code to support Fontconfig in GNUstep right now ?

- creating contexts for X Window windows

Still missing:
- CGImage (would need this at least before a release)
- CGPath: paths independent of the current path in a graphics context
(Cairo does not have an API for this currently or the one which it has
  is insufficient)

Isn't GGPath quite similar to NSBezierPath ?

- CGPattern and CGShading maybe possible with Cairo although the APIs
  differ somewhat

I think there is still no pattern drawing support in GNUstep, Fred was planning to add it… well, it's possible it's done now and I missed it.

- CGBitmapContext, CGPDFContext: Cairo has output backends for these
  (plus postscript and SVG) so it should be possible easily

Some screenshots and sample source code can be found at:

http://goliat.eik.bme.hu/~balaton/gnustep/opal/

Impressive and nice name :-)

LaunchServices isn't really that terrific imo.

The API itself may not be (which we don't have to follow), but the functionality IMO is useful to encapsulate code common for GWorkspace, Dock, Fiend, etc. and provide a barrier between libraries and desktop environments. (The original idea years ago was something similar as far as I can recall, i.e. not to have a workspace app as part of GNUstep but provide a library on top of which such can be built. This was mentioned somewhere in a document but I can't find it any more. LaunchServices is exatly this library.)

I don't understand why you are talking about Dock and Fiend. But otherwise I'm following you on this library idea, but I would be interested by something fairly different from LaunchServices (or similar). I mean not relying on the usual file extensions / applications binding. I would take in account the application role and rely on UTI (considering file extensions only as a fallback).

About Uniform Type Identifiers : <http://developer.apple.com/ documentation/Carbon/Conceptual/understanding_utis/>

Cheers,
Quentin.

--
Quentin Mathé
address@hidden





reply via email to

[Prev in Thread] Current Thread [Next in Thread]