From: Joel de Guzman (joel_at_[hidden])
Date: 2005-06-29 06:49:24
Anis Benyelloul wrote:
> Joel de Guzman <joel <at> boost-consulting.com> writes:
>>Example: I need to XOR a YRegion
>>with a MacRegion.
> Although actual library implmentation permits mixed implmentation
> computations, I really doubt you'll ever need to do that. Do you think that
> you may be using Xlib's XRegion and Mac's MacRegion (and Windows' RGN) in the
> same program ? Usually you'll just choose one implmentation and stick with it
> throughout your project... This still remanis a consistency concern, however.
Right. Ok Fair enough.
>>The thing is, a classic mac region is an
>>opaque data type (actually, it's not implemented as a collection
>>of boxes). The mere fact that it is opaque makes it impossible
>>to even copy a mac region to a YRegion.
> Right ! Let me add that Window's RGN is also an opaque type. Well maybe a
> geom::region is useful but I don't think that MacRegion XRegion and RGN are
> suitable implmentation of what we define as a ``region''.
The problem with opaque data types is that they are limited to only
what they offer. The reason why I wanted interoperability is that
at the very least, I'd want to assign, say, a Mac Region to a
cross-platform region. That way, I can, say, transform the more
versatile cross-platform region, scale it, rotate it, etc. These
functions are not available in the platform specific region.
-- Joel de Guzman http://www.boost-consulting.com http://spirit.sf.net
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk