| 1792 | } |
| 1793 | |
| 1794 | void |
| 1795 | RedrawThreadWorker::draw_layer_wo_cache (int from_level, int to_level, db::cell_index_type ci, const db::CplxTrans &trans, const std::vector<db::Box> &vv, int level, |
| 1796 | lay::CanvasPlane *fill, lay::CanvasPlane *frame, lay::CanvasPlane *vertex, lay::CanvasPlane *text, const UpdateSnapshotCallback *update_snapshot) |
| 1797 | { |
| 1798 | const db::Cell &cell = mp_layout->cell (ci); |
| 1799 | |
| 1800 | lay::Renderer &r = *mp_renderer; |
| 1801 | const db::Box &bbox = cell.bbox (m_layer); |
| 1802 | |
| 1803 | const lay::Bitmap *vertex_bitmap = dynamic_cast<const lay::Bitmap *> (vertex); |
| 1804 | |
| 1805 | // draw this level |
| 1806 | if (level >= from_level && level < to_level) { |
| 1807 | |
| 1808 | // draw the shapes or insert into the cell cache. |
| 1809 | for (std::vector<db::Box>::const_iterator v = vv.begin (); v != vv.end (); ++v) { |
| 1810 | |
| 1811 | if (v->empty ()) { |
| 1812 | continue; |
| 1813 | } |
| 1814 | |
| 1815 | const db::Shapes &shapes = cell.shapes (m_layer); |
| 1816 | db::Shape last_array; |
| 1817 | |
| 1818 | size_t current_quad_id = 0; |
| 1819 | size_t current_array_quad_id = 0; |
| 1820 | |
| 1821 | db::ShapeIterator shape (shapes.begin_touching (*v, db::ShapeIterator::Boxes | db::ShapeIterator::Polygons | db::ShapeIterator::Edges | db::ShapeIterator::Paths | db::ShapeIterator::Points, mp_prop_sel, m_inv_prop_sel)); |
| 1822 | while (! shape.at_end ()) { |
| 1823 | |
| 1824 | test_snapshot (update_snapshot); |
| 1825 | |
| 1826 | // skip this quad if we have drawn something here already |
| 1827 | size_t qid = shape.quad_id (); |
| 1828 | bool skip = false; |
| 1829 | if (vertex_bitmap && qid != current_quad_id) { |
| 1830 | current_quad_id = qid; |
| 1831 | skip = skip_quad (shape.quad_box () & bbox, vertex_bitmap, trans); |
| 1832 | } |
| 1833 | |
| 1834 | if (skip) { |
| 1835 | shape.skip_quad (); |
| 1836 | continue; |
| 1837 | } |
| 1838 | |
| 1839 | if (shape.in_array ()) { |
| 1840 | |
| 1841 | if (last_array != shape.array ()) { |
| 1842 | |
| 1843 | last_array = shape.array (); |
| 1844 | current_array_quad_id = 0; |
| 1845 | |
| 1846 | bool simplified = false; |
| 1847 | |
| 1848 | if (last_array.type () == db::Shape::PolygonPtrArray) { |
| 1849 | simplified = draw_array_simplified<db::Shape::polygon_ptr_array_type> (mp_renderer.get (), last_array, frame, vertex, trans); |
| 1850 | } else if (last_array.type () == db::Shape::SimplePolygonPtrArray) { |
| 1851 | simplified = draw_array_simplified<db::Shape::simple_polygon_ptr_array_type> (mp_renderer.get (), last_array, frame, vertex, trans); |
nothing calls this directly
no test coverage detected