src/gldraw.cpp

changeset 512
adab82ab13a5
parent 511
c3787dbd6315
child 513
29eb671b34f6
equal deleted inserted replaced
511:c3787dbd6315 512:adab82ab13a5
1789 uint32* imgdata = reinterpret_cast<uint32*> (cap); 1789 uint32* imgdata = reinterpret_cast<uint32*> (cap);
1790 bool filled = false; 1790 bool filled = false;
1791 1791
1792 // Check the top and bottom rows 1792 // Check the top and bottom rows
1793 for (int i = 0; i < w && !filled; ++i) 1793 for (int i = 0; i < w && !filled; ++i)
1794 if (imgdata[i] != white || imgdata[ ( (h - 1) * w) + i] != white) 1794 if (imgdata[i] != white || imgdata[((h - 1) * w) + i] != white)
1795 filled = true; 1795 filled = true;
1796 1796
1797 // Left and right edges 1797 // Left and right edges
1798 for (int i = 0; i < h && !filled; ++i) 1798 for (int i = 0; i < h && !filled; ++i)
1799 if (imgdata[i * w] != white || imgdata[ (i * w) + (w - 1)] != white) 1799 if (imgdata[i * w] != white || imgdata[(i * w) + w - 1] != white)
1800 filled = true; 1800 filled = true;
1801 1801
1802 delete[] cap; 1802 delete[] cap;
1803 1803
1804 if (firstrun) 1804 if (firstrun)

mercurial