1762 |
1762 |
1763 bool lastfilled = false; |
1763 bool lastfilled = false; |
1764 bool firstrun = true; |
1764 bool firstrun = true; |
1765 const uint32 white = 0xFFFFFFFF; |
1765 const uint32 white = 0xFFFFFFFF; |
1766 bool inward = true; |
1766 bool inward = true; |
1767 int run = 0; |
|
1768 const int w = m_width, h = m_height; |
1767 const int w = m_width, h = m_height; |
1769 |
1768 |
1770 glClearColor (1.0, 1.0, 1.0, 1.0); |
1769 glClearColor (1.0, 1.0, 1.0, 1.0); |
1771 glDisable (GL_DITHER); |
1770 glDisable (GL_DITHER); |
1772 |
1771 |
1797 |
1796 |
1798 // Left and right edges |
1797 // Left and right edges |
1799 for (int i = 0; i < h && !filled; ++i) |
1798 for (int i = 0; i < h && !filled; ++i) |
1800 if (imgdata[i * w] != white || imgdata[ (i * w) + (w - 1)] != white) |
1799 if (imgdata[i * w] != white || imgdata[ (i * w) + (w - 1)] != white) |
1801 filled = true; |
1800 filled = true; |
|
1801 |
|
1802 delete[] cap; |
1802 |
1803 |
1803 if (firstrun) |
1804 if (firstrun) |
1804 { // If this is the first run, we don't know enough to determine |
1805 { // If this is the first run, we don't know enough to determine |
1805 // whether the zoom was to fit, so we mark in our knowledge so |
1806 // whether the zoom was to fit, so we mark in our knowledge so |
1806 // far and start over. |
1807 // far and start over. |