Commit ed7529b2 authored by Mathieu Faverge's avatar Mathieu Faverge

Fix issue in block dimensions

parent bdba6e92
#include <assert.h>
#include <math.h>
#include "Zooming.hpp"
#include "../Helper.hpp"
......@@ -92,9 +93,8 @@ void Zooming::move(double xStart, double xEnd, double yStart, double yEnd)
// Get first block size in col from x to xEnd
int x = (cblk->m_fcolnum - startCol) * xCoeff;
int xEnd = (cblk->m_lcolnum - startCol) * xCoeff;
int xEnd = (cblk->m_lcolnum + 1 - startCol) * xCoeff;
xEnd = ( xEnd > x+1 ) ? xEnd : x+1;
float cblk_color = cblk->m_color;
blok = m_matrix->m_bloktab + fbloknum;
......@@ -108,9 +108,7 @@ void Zooming::move(double xStart, double xEnd, double yStart, double yEnd)
// Get first block size in row from y to yEnd
int y = (blok->m_frownum - startRow) * yCoeff;
int yEnd = (blok->m_lrownum - startRow) * yCoeff;
yEnd = ( yEnd > y+1 ) ? yEnd : y+1;
int yEnd = (blok->m_lrownum + 1 - startRow) * yCoeff;
float color = blok->m_color == -1. ? cblk_color : blok->m_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