| 598 | } |
| 599 | |
| 600 | void |
| 601 | LayerProperties::do_realize (const LayoutViewBase *view) const |
| 602 | { |
| 603 | m_layer_index = -1; |
| 604 | m_cellview_index = -1; |
| 605 | m_trans.clear (); |
| 606 | m_inv_prop_set = true; |
| 607 | m_prop_set.clear (); |
| 608 | m_hier_levels = m_source_real.hier_levels (); |
| 609 | |
| 610 | if (view) { |
| 611 | |
| 612 | if (m_source_real.cv_index () < 0) { |
| 613 | if (view->cellviews () > 0) { |
| 614 | m_cellview_index = 0; |
| 615 | } |
| 616 | } else if (m_source_real.cv_index () < int (view->cellviews ())) { |
| 617 | m_cellview_index = m_source_real.cv_index (); |
| 618 | } |
| 619 | |
| 620 | if (m_cellview_index >= 0) { |
| 621 | |
| 622 | const lay::CellView &cv = view->cellview (m_cellview_index); |
| 623 | |
| 624 | // retrieve the property selector, if one is present |
| 625 | if (! m_source_real.property_selector ().is_null ()) { |
| 626 | m_inv_prop_set = m_source_real.property_selector ().matching (m_prop_set); |
| 627 | } |
| 628 | |
| 629 | // compute the effective transformation in database units |
| 630 | m_trans = m_source_real.trans (); |
| 631 | |
| 632 | if (m_source_real.special_purpose () == ParsedLayerSource::SP_None) { |
| 633 | |
| 634 | m_layer_index = m_source_real.layer_index (); |
| 635 | |
| 636 | // lookup the layer with the given name/layer/datatype |
| 637 | if (m_layer_index < 0 && ! m_source_real.is_wildcard_layer ()) { |
| 638 | m_layer_index = cv->layout ().get_layer_maybe (m_source_real.layer_props ()); |
| 639 | } |
| 640 | |
| 641 | } |
| 642 | |
| 643 | } |
| 644 | |
| 645 | } |
| 646 | |
| 647 | if (m_trans.empty ()) { |
| 648 | m_trans.push_back (db::DCplxTrans ()); |
| 649 | } |
| 650 | } |
| 651 | |
| 652 | |
| 653 | // ------------------------------------------------------------- |
nothing calls this directly
no test coverage detected