Base class for u16 color models?

Casper Boemann cbr at boemann.dk
Tue Aug 9 20:53:54 CEST 2005


On Tuesday 09 August 2005 17:59, Boudewijn Rempt wrote:
> I'm working on a 16/bit integer XYZ colorspace (for the default operations
> that are now implemented with conversion to and from qcolor), and I noticed
> that the colorspace_rgb_u16 has a number of methods that are likely to be
> useful for any 16/bit integer colorspace. Would it be a good idea to make
> something like the following hierarchy
>
>
> KisStrategyColorSpace (which should be renamed to KisAbstractColorspace)
>
> 	+- KisRRGColorspace
> 	+- KisCMYKColorspace
> 	+- KisGrayColorspace
> 	+- KisAlphaColorspace
> 	+
> 	\- KisU16Colorspace
>
> 		+- KisRGBU16Colorspace
> 		+- KisCMYKU16Colorspace
> 		+- KisGray16Colorspace
> 		+
>
c++ allows multiple inheritance so we could elaborate on the hierarchy later 
on if needed.
we should alsoe have a baseclass for u8 i think

I like your names

> And so on... And of course, the same for the 32bit float & integer
> colorspace once Adrian has those done. I like the prolog & epilog composite
> macros in the 16 bit rgb a lot, by the way :-) -- but maybe we can move the
> bitBlt with the switch that actually does calls the composition routines
> into KisStrategyColorSpace?
but wouldn't that just be duplicated code in every colorspace

> The idea with XYZ is, by the way, to have as accurate a default
> implemenation as possible, but one that is slow enough to stimulate us to
> provide optimized implementations in the individual colorspaces :-)
what do you mean with XYZ

-- 
best regards / venlig hilsen
Casper Boemann


More information about the kimageshop mailing list