Commit 632e18ad authored by Mathieu Faverge's avatar Mathieu Faverge

Limit the zoom inside the box

parent ea825ae7
......@@ -95,6 +95,7 @@ void Zooming::move(double xStart, double xEnd, double yStart, double yEnd)
int xEnd = (cblk->m_lcolnum - startCol) * xCoeff;
xEnd = ( xEnd > x+1 ) ? xEnd : x+1;
float cblk_color = cblk->m_color;
blok = m_matrix->m_bloktab + fbloknum;
for (j = fbloknum; j < lbloknum; ++j, blok++)
......@@ -111,11 +112,13 @@ void Zooming::move(double xStart, double xEnd, double yStart, double yEnd)
yEnd = ( yEnd > y+1 ) ? yEnd : y+1;
float color = blok->m_color == -1. ? cblk_color : blok->m_color;
for( m=x; m<xEnd; m++ )
{
for( n=y; n<yEnd; n++ )
{
m_colors[m][n] = 0.0f;
for( n=y; n<yEnd; n++ )
{
m_colors[m][n] = color;
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment