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

Method to_image_mono

src/laybasic/laybasic/layRedrawThreadCanvas.cc:414–434  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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)
416{
417 if (width > m_width) {
418 width = m_width;
419 }
420 if (height > m_height) {
421 height = m_height;
422 }
423
424 unsigned int all_one = 0xffffffff;
425
426 // convert the plane data to image data
427 bitmaps_to_image (view_ops, mp_plane_buffers, dp, ls, dpr, &img, width, height, true, &mutex ());
428
429 // convert the planes of the "drawing" objects too:
430 std::vector <std::vector <lay::Bitmap *> >::const_iterator bt = mp_drawing_plane_buffers.begin ();
431 for (lay::Drawings::const_iterator d = drawings->begin (); d != drawings->end () && bt != mp_drawing_plane_buffers.end (); ++d, ++bt) {
432 bitmaps_to_image (d->get_view_ops (*this, background ? all_one : 0, foreground ? all_one : 0, active ? all_one : 0), *bt, dp, ls, dpr, &img, width, height, true, &mutex ());
433 }
434}
435
436}

Callers 1

Calls 4

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

Tested by

no test coverage detected