--------------------------------------------------------------------
| 216 | |
| 217 | //-------------------------------------------------------------------- |
| 218 | void copy_hline(int x1, int y, int x2, const color_type& c) |
| 219 | { |
| 220 | if (x1 > x2) |
| 221 | { |
| 222 | int t = x2; |
| 223 | x2 = x1; |
| 224 | x1 = t; |
| 225 | } |
| 226 | if (y > ymax()) |
| 227 | return; |
| 228 | if (y < ymin()) |
| 229 | return; |
| 230 | if (x1 > xmax()) |
| 231 | return; |
| 232 | if (x2 < xmin()) |
| 233 | return; |
| 234 | |
| 235 | if (x1 < xmin()) |
| 236 | x1 = xmin(); |
| 237 | if (x2 > xmax()) |
| 238 | x2 = xmax(); |
| 239 | |
| 240 | m_ren->copy_hline(x1, y, x2 - x1 + 1, c); |
| 241 | } |
| 242 | |
| 243 | //-------------------------------------------------------------------- |
| 244 | void copy_vline(int x, int y1, int y2, const color_type& c) |