cbr at boemann.dk
Tue Jul 6 12:18:10 CEST 2004
> > For reasons I have already stated it is no good to return a pixel class.
> > Trust me on this one.
> Well, it does work for Vigra, I guess that it can be done in C++.
well vigra doesn't do it dynamically. It does it through templating which
means that it has an image class for each pixel type !
We could do that, but as we have already decided to use color strategies and
a single paintdevice we need to do it the way I have described.
That does NOT mean that we cannot have a pixel class and specific
subclasses. If (and this is important) we only use them WITHIN the color
strategies. It may be a help in code reusage among related colorstrategies.
I may not, but even from a estetically point of view we might do it anyway.
No extra members or virtual functions though - but nonvirtual functions are
Please note that from all other classes it still needs to be QUANTUM *,
unless we really what to make a total redesign of our code base (which I
Even the color strategies public funtions need to take QUANTUM * as input
and do the cast as their first thing like:
LabPixel *pixel = (LabPixel *)pixeldata;
//then the rest of the function can forget about pixeldata and only work
More information about the kimageshop