| 890 | } |
| 891 | |
| 892 | void |
| 893 | RedrawThreadWorker::draw_boxes_impl (bool drawing_context, db::cell_index_type ci, const db::CplxTrans &trans, const std::vector<db::Box> &redraw_regions, int level, bool for_ghosts) |
| 894 | { |
| 895 | // do not draw, if there is nothing to draw |
| 896 | if (mp_layout->cells () <= ci || redraw_regions.empty ()) { |
| 897 | return; |
| 898 | } |
| 899 | |
| 900 | const db::Cell &cell = mp_layout->cell (ci); |
| 901 | |
| 902 | // we will never come to a valid level .. |
| 903 | if (! need_draw_box (mp_layout, cell, level, for_ghosts)) { |
| 904 | return; |
| 905 | } |
| 906 | if (cell_var_cached (ci, trans)) { |
| 907 | return; |
| 908 | } |
| 909 | |
| 910 | std::unique_ptr<lay::Bitmap> opt_bitmap; |
| 911 | |
| 912 | unsigned int plane_group = 2; |
| 913 | if (drawing_context) { |
| 914 | plane_group = 0; |
| 915 | } else if (m_child_context_enabled && level + 1 > 0) { |
| 916 | plane_group = 1; |
| 917 | } |
| 918 | |
| 919 | lay::CanvasPlane *vertex = m_planes[3 + plane_group * (planes_per_layer / 3)]; |
| 920 | lay::Bitmap *vertex_bitmap = dynamic_cast<lay::Bitmap *> (vertex); |
| 921 | if (vertex_bitmap) { |
| 922 | opt_bitmap.reset (new lay::Bitmap (vertex_bitmap->width (), vertex_bitmap->height (), vertex_bitmap->resolution (), vertex_bitmap->font_resolution ())); |
| 923 | } |
| 924 | |
| 925 | for (std::vector<db::Box>::const_iterator b = redraw_regions.begin (); b != redraw_regions.end (); ++b) { |
| 926 | draw_boxes_impl (drawing_context, ci, trans, *b, level, for_ghosts, opt_bitmap.get ()); |
| 927 | } |
| 928 | } |
| 929 | |
| 930 | void |
| 931 | RedrawThreadWorker::draw_boxes_impl (bool drawing_context, db::cell_index_type ci, const db::CplxTrans &trans, const db::Box &redraw_box, int level, bool for_ghosts, lay::Bitmap *opt_bitmap) |
nothing calls this directly
no test coverage detected