nr-filter-pixops.h revision d0bb68525547101b5c938b246ff897a5de413cff
#ifndef __NR_FILTER_PIXOPS_H__
#define __NR_FILTER_PIXOPS_H__
/*
* Per-pixel image manipulation functions.
* These can be used by all filter primitives, which combine two images on
* per-pixel basis. These are at least feBlend, feComposite and feMerge.
*
* Authors:
* Niko Kiirala <niko@kiirala.com>
*
* Copyright (C) 2007 authors
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
/**
* Mixes the two input images using the function given as template.
* The result is placed in out.
* The mixing function should have the following type:
* void mix(unsigned char *result, unsigned char const *in1,
* unsigned char const *in2);
* Each of the parameters for mix-function is a pointer to four bytes of data,
* giving the RGBA values for that pixel. The mix function must only access
* the four bytes beginning at a pointer given as parameter.
*/
/*
* The implementation is in a header file because of the template. It has to
* be in the same compilation unit as the code using it. Otherwise, linking
* the program will not succeed.
*/
unsigned char zero_rgba[4] = {0, 0, 0, 0};
// in1 begins before in2 on y-axis
}
}
// in2 begins before in1 on y-axis
}
}
}
// in1 begins before in2 on x-axis
}
// in2 begins before in1 on x-axis
}
}
}
// in1 ends after in2 on x-axis
}
// in2 ends after in1 on x-axis
}
}
}
// in1 ends after in2 on y-axis
}
}
// in2 ends after in1 on y-axis
}
}
}
}
} // namespace NR
#endif // __NR_FILTER_PIXOPS_H_
/*
Local Variables:
mode:c++
c-file-style:"stroustrup"
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
indent-tabs-mode:nil
fill-column:99
End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :