src/gldraw.cpp

changeset 542
46a33bdc0b36
parent 541
0e38beeb050a
child 544
a52cfa218780
equal deleted inserted replaced
541:0e38beeb050a 542:46a33bdc0b36
1211 y1 = y0 + 1; 1211 y1 = y0 + 1;
1212 } 1212 }
1213 1213
1214 // x0 and y0 must be less than x1 and y1, respectively. 1214 // x0 and y0 must be less than x1 and y1, respectively.
1215 if (x0 > x1) 1215 if (x0 > x1)
1216 dataswap (x0, x1); 1216 qSwap (x0, x1);
1217 1217
1218 if (y0 > y1) 1218 if (y0 > y1)
1219 dataswap (y0, y1); 1219 qSwap (y0, y1);
1220 1220
1221 // Clamp the values to ensure they're within bounds 1221 // Clamp the values to ensure they're within bounds
1222 x0 = max (0, x0); 1222 x0 = max (0, x0);
1223 y0 = max (0, y0); 1223 y0 = max (0, y0);
1224 x1 = min (x1, m_width); 1224 x1 = min (x1, m_width);

mercurial