1 #ifndef GUI_OPENGL___RASTERIZER__HPP
2 #define GUI_OPENGL___RASTERIZER__HPP
61 TVPUnit vp_len = vp_max - vp_min;
63 if (vp_len <= 0) vp_len = 1;
74 bool intersect = ! (pix_to_open <= 0 || pix_from >= vp_len);
83 if (pix_to_open - pix_from < 1.0 && pix_left != pix_right) {
86 int left_index = (
int) pix_left;
87 int right_index = (
int) pix_right;
89 if(left_index == right_index) {
92 float fraction = float(pix_to_open - pix_from);
93 f_add(
m_Raster[left_index], attr, fraction,
false);
95 if(pix_left < pix_from) {
97 float fraction = float(pix_left + 1 - pix_from);
98 f_add(
m_Raster[left_index], attr, fraction,
true);
101 if(pix_right < pix_to_open) {
103 float fraction = float(pix_to_open - pix_right);
104 f_add(
m_Raster[right_index], attr, fraction,
true);
107 for(
int i = left_index;
i <= right_index;
i++ ) {
Include a standard set of the NCBI C++ Toolkit most basic headers.
const TRaster & GetRaster() const
TModelUnit Project(TModelUnit pos) const
void AddInterval(TModelUnit min, TModelUnit max, const A &attr, F f_add)
CRasterizer(TVPUnit vp_min, TVPUnit vp_max, TModelUnit min, TModelUnit max)
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
unsigned int
A callback function used to compare two keys in a database.
#define F(x)
Make a parametrized function appear to have only one variable.