| 543 | } |
| 544 | |
| 545 | void SpanLayout::LayoutFloatBlock(CurrentLine& current_line, double max_width) |
| 546 | { |
| 547 | FloatBox floatbox; |
| 548 | floatbox.type = objects[current_line.object_index].type; |
| 549 | floatbox.image = objects[current_line.object_index].image; |
| 550 | floatbox.component = objects[current_line.object_index].component; |
| 551 | floatbox.id = objects[current_line.object_index].id; |
| 552 | if (objects[current_line.object_index].type == object_image) |
| 553 | floatbox.rect = Rect::xywh(0, current_line.y_position, floatbox.image->GetWidth(), floatbox.image->GetHeight()); |
| 554 | else if (objects[current_line.object_index].type == object_component) |
| 555 | floatbox.rect = Rect::xywh(0, current_line.y_position, floatbox.component->GetWidth(), floatbox.component->GetHeight()); |
| 556 | |
| 557 | if (objects[current_line.object_index].float_type == float_left) |
| 558 | floats_left.push_back(FloatBoxLeft(floatbox, max_width)); |
| 559 | else |
| 560 | floats_right.push_back(FloatBoxRight(floatbox, max_width)); |
| 561 | |
| 562 | ReflowLine(current_line, max_width); |
| 563 | } |
| 564 | |
| 565 | void SpanLayout::ReflowLine(CurrentLine& step, double max_width) |
| 566 | { |