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

Function png_texts

src/laybasic/laybasic/layLayoutViewBase.cc:2988–3006  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2986}
2987
2988static std::vector<std::pair<std::string, std::string> >
2989png_texts (const lay::LayoutViewBase *view, const db::DBox &box)
2990{
2991 std::vector<std::pair<std::string, std::string> > texts;
2992
2993 // Unfortunately the PNG writer does not allow writing of long strings.
2994 // We separate the description into a set of keys:
2995
2996 for (unsigned int i = 0; i < view->cellviews (); ++i) {
2997 if (view->cellview (i).is_valid ()) {
2998 std::string name = view->cellview (i)->layout ().cell_name (view->cellview (i).cell_index ());
2999 texts.push_back (std::make_pair (std::string ("Cell") + tl::to_string (int (i) + 1), name));
3000 }
3001 }
3002
3003 texts.push_back (std::make_pair (std::string ("Rect"), box.to_string ()));
3004
3005 return texts;
3006}
3007
3008#if defined(HAVE_QT) && !defined(PREFER_LIBPNG_FOR_SAVE)
3009void

Callers 3

save_screenshotMethod · 0.85
save_imageMethod · 0.85

Calls 9

cellviewMethod · 0.80
stringFunction · 0.50
to_stringFunction · 0.50
is_validMethod · 0.45
cell_nameMethod · 0.45
layoutMethod · 0.45
cell_indexMethod · 0.45
push_backMethod · 0.45
to_stringMethod · 0.45

Tested by

no test coverage detected