Commit 35add0c3 authored by Dirk Mueller's avatar Dirk Mueller
Browse files

the code doesn't make sense. if you assign 0, then comparing if

its < 0 or bigger than a number != 0 is always false. same for
xPaintedRight
CID 3765

svn path=/trunk/KDE/kdeedu/marble/; revision=728053
parent dc9fb915
......@@ -81,15 +81,11 @@ void FlatScanlineTextureMapper::mapTexture(QImage* canvasImage,
if (yPaintedBottom > m_imageHeight) yPaintedBottom = m_imageHeight;
//Calculate x-range
xPaintedLeft = 0;
xLeft = m_imageWidth / 2 - 2 * radius;
xPaintedRight = m_imageWidth;
xRight = m_imageWidth / 2 + 2 * radius;
if (xPaintedLeft < 0) xPaintedLeft = 0;
if (xPaintedLeft > m_imageWidth) xPaintedLeft = m_imageWidth;
if (xPaintedRight < 0) xPaintedRight = 0;
if (xPaintedRight > m_imageWidth) xPaintedRight = m_imageWidth;
xPaintedLeft = 0;
xPaintedRight = m_imageWidth;
// Calculate how many degrees are being represented per pixel.
float xfactor = 2 * M_PI / (float)(xRight - xLeft);
......
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