| 270 | |
| 271 | |
| 272 | void POLY_BLOCK::fill(ScrollView* window, ScrollView::Color colour) { |
| 273 | inT16 y; |
| 274 | inT16 width; |
| 275 | PB_LINE_IT *lines; |
| 276 | ICOORDELT_LIST *segments; |
| 277 | ICOORDELT_IT s_it; |
| 278 | |
| 279 | lines = new PB_LINE_IT (this); |
| 280 | window->Pen(colour); |
| 281 | |
| 282 | for (y = this->bounding_box ()->bottom (); |
| 283 | y <= this->bounding_box ()->top (); y++) { |
| 284 | segments = lines->get_line (y); |
| 285 | if (!segments->empty ()) { |
| 286 | s_it.set_to_list (segments); |
| 287 | for (s_it.mark_cycle_pt (); !s_it.cycled_list (); s_it.forward ()) { |
| 288 | // Note different use of ICOORDELT, x coord is x coord of pixel |
| 289 | // at the start of line segment, y coord is length of line segment |
| 290 | // Last pixel is start pixel + length. |
| 291 | width = s_it.data ()->y (); |
| 292 | window->SetCursor(s_it.data ()->x (), y); |
| 293 | window->DrawTo(s_it.data ()->x () + (float) width, y); |
| 294 | } |
| 295 | } |
| 296 | } |
| 297 | |
| 298 | delete lines; |
| 299 | } |
| 300 | #endif |
| 301 | |
| 302 |
nothing calls this directly
no test coverage detected