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

Method to_image

src/laybasic/laybasic/layRedrawThreadCanvas.cc:394–412  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

392}
393
394void
395BitmapRedrawThreadCanvas::to_image (const std::vector <lay::ViewOp> &view_ops, const lay::DitherPattern &dp, const lay::LineStyles &ls, double dpr, tl::Color background, tl::Color foreground, tl::Color active, const lay::Drawings *drawings, tl::PixelBuffer &img, unsigned int width, unsigned int height)
396{
397 if (width > m_width) {
398 width = m_width;
399 }
400 if (height > m_height) {
401 height = m_height;
402 }
403
404 // convert the plane data to image data
405 bitmaps_to_image (view_ops, mp_plane_buffers, dp, ls, dpr, &img, width, height, true, &mutex ());
406
407 // convert the planes of the "drawing" objects too:
408 std::vector <std::vector <lay::Bitmap *> >::const_iterator bt = mp_drawing_plane_buffers.begin ();
409 for (lay::Drawings::const_iterator d = drawings->begin (); d != drawings->end () && bt != mp_drawing_plane_buffers.end (); ++d, ++bt) {
410 bitmaps_to_image (d->get_view_ops (*this, background, foreground, active), *bt, dp, ls, dpr, &img, width, height, true, &mutex ());
411 }
412}
413
414void
415BitmapRedrawThreadCanvas::to_image_mono (const std::vector <lay::ViewOp> &view_ops, const lay::DitherPattern &dp, const lay::LineStyles &ls, double dpr, bool background, bool foreground, bool active, const lay::Drawings *drawings, tl::BitmapBuffer &img, unsigned int width, unsigned int height)

Callers 5

save_screenshotMethod · 0.45
save_imageMethod · 0.45
paint_eventMethod · 0.45
image_with_optionsMethod · 0.45

Calls 4

bitmaps_to_imageFunction · 0.85
get_view_opsMethod · 0.80
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected