Support for artistic tone curves in DCPs

see issue 1527
This commit is contained in:
Oliver Duis
2012-08-20 07:43:39 +02:00
parent 8ac87562e7
commit dbf3e54f7e
14 changed files with 339 additions and 215 deletions

View File

@@ -135,7 +135,7 @@ public:
return *this;
}
// use with integer indices
T& operator[](int index) {
T& operator[](int index) const {
if (((unsigned int)index)<size) return data[index];
else
{
@@ -147,7 +147,7 @@ public:
}
// use with float indices
T operator[](float index) {
T operator[](float index) const {
int idx = (int)index; // don't use floor! The difference in negative space is no problems here
if (((unsigned int)idx) > maxs) {
if (idx<0)
@@ -185,7 +185,7 @@ public:
#endif
operator bool (void)
operator bool (void) const
{
return size>0;
}