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

Method plane

src/laybasic/laybasic/layViewObject.cc:1326–1344  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1324}
1325
1326lay::CanvasPlane *
1327BitmapViewObjectCanvas::plane (const lay::ViewOp &style)
1328{
1329 std::map <lay::ViewOp, unsigned int>::iterator b = m_fg_bitmap_table.find (style);
1330 if (b == m_fg_bitmap_table.end ()) {
1331
1332 // we need to create a new plane
1333 m_fg_bitmap_table.insert (std::make_pair (style, (unsigned int) mp_alloc_bitmaps.size ()));
1334 lay::Bitmap *bm = new lay::Bitmap (m_width, m_height, m_resolution, m_font_resolution);
1335 mp_fg_bitmaps.push_back (bm);
1336 mp_alloc_bitmaps.push_back (bm);
1337 m_fg_view_ops.push_back (style);
1338 return bm;
1339
1340 } else {
1341 // we can recycle a current one
1342 return mp_alloc_bitmaps [b->second];
1343 }
1344}
1345
1346lay::CanvasPlane *
1347BitmapViewObjectCanvas::plane (const std::vector<lay::ViewOp> &style)

Callers 7

renderFunction · 0.80
renderMethod · 0.80
renderMethod · 0.80
renderMethod · 0.80
do_renderMethod · 0.80
do_renderMethod · 0.80
get_bitmapsMethod · 0.80

Calls 6

findMethod · 0.45
endMethod · 0.45
insertMethod · 0.45
sizeMethod · 0.45
push_backMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected