[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-kimageshop
Subject:    Re: Back
From:       Cyrille Berger <cyb () lepi ! org>
Date:       2004-07-26 12:37:24
Message-ID: 200407261437.24851.cyb () lepi ! org
[Download RAW message or body]

> What I *fundamentally* don't like is the exposure of the channel data to
> anyone but the colorstrategy.

but filters can't be put inside a colorstrategy.

> Yes if anyone can explain how this should be accomplished, with the
> QUANTUMS exposed I'm all ears.

in tile manager data are stored in uchar* (uchar is the smallest data 
division, except for boolean, which are stored in uchar...).

a double equal four uchar, imagine we have a colorstrategy with 3 double 
channels, and one uchar channel. The KisPixelRepresentation will look like 
this :

KisPixelRepresentationMyColorStrategy : public  KisPixelRepresentation 
{

KisChannelDouble channel1() { return  KisChannelDouble( (double*) data ); };
KisChannelDouble channel2() { return  KisChannelDouble( (double*) ( data + 
sizeof(double) ) ); };
KisChannelDouble channel3() { return  KisChannelDouble( (double*) ( data + 
2*sizeof(double) ) ); };
KisChannelUChar channel4() { return  KisChannelUChar ( data + 3 
*sizeof(double) ); };


private:
 uchar* data;

}

KisChannelSmthg look like  the current KisQuantum.

-- 
--- Cyrille Berger ---
_______________________________________________
kimageshop mailing list
kimageshop@kde.org
https://mail.kde.org/mailman/listinfo/kimageshop
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic