Tom Gregorovic wrote:
Hi,
I think over how to implement canvas for Carbon interface.
There are two possibilities to use: QuickDraw or Quartz 2D. I want to consult it with you.
Here is the list of disadvantages, I have found:

QuickDraw
- DC of Carbon controls must use Window Port
- deprecated in Mac OS X v10.4

Quartz 2D

From the start (or short after) it has been my idea to use this. IMO it is more close to how the LCL handle things. IIRC per view/widget insted of a global canvas with a global paint.
We are already creating windows in compositing mode.

- unable to implement GetPixel, FloodFill, SetPixel must be simulated via line drawing

A pixel is just a very short line. In most cases we're not drawin directly to a view, so we can get the pixel for our buffer. I think it is possible to have floodfills.

- different coordination system (change Current Transformation Matrix)

:) I've been experimenting with that, the first result was that everything was upsidedown. However you can easalil map between coordinate systems

- bledning instead of ROP

:)

- bitmap canvas implementation (needs Mac OS X v10.4 because of CGBitmapContextCreateImage, but we can get round it)

IIRC the current requirement was 10.3, however that was when I looked the last time. IIRC for some controls we already need 10.4

Feel free to point out anything I have omitted.
From my point of view the Quartz 2D appears to be more suitable, although it doesn't provide per-pixel operations.

I do think that that can be solved somehow (should be).


Marc

_________________________________________________________________
    To unsubscribe: mail [EMAIL PROTECTED] with
               "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to