MCPcopy Create free account
hub / github.com/KLayout/klayout / draw_boxes_impl

Method draw_boxes_impl

src/laybasic/laybasic/layRedrawThreadWorker.cc:892–928  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

890}
891
892void
893RedrawThreadWorker::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
930void
931RedrawThreadWorker::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)

Callers

nothing calls this directly

Calls 15

maxFunction · 0.85
safe_transformed_boxFunction · 0.85
display_nameMethod · 0.80
leftMethod · 0.80
bottomMethod · 0.80
topMethod · 0.80
rightMethod · 0.80
objectMethod · 0.80
yMethod · 0.80
skip_quadFunction · 0.70
VectorClass · 0.50
stringFunction · 0.50

Tested by

no test coverage detected