Skip to content

Commit 590bc91

Browse files
Merge pull request #2226 from KLayout/bugfix/issue-2219
Issue #2219 (drawing of empty cells)
2 parents b8ff75d + 12b7451 commit 590bc91

File tree

8 files changed

+322
-170
lines changed

8 files changed

+322
-170
lines changed

src/laybasic/laybasic/layLayoutViewBase.cc

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,7 @@ LayoutViewBase::init (db::Manager *mgr)
342342
m_box_text_transform = true;
343343
m_box_font = 0;
344344
m_min_size_for_label = 16;
345+
m_empty_cell_dimension = 4.0;
345346
m_cell_box_visible = true;
346347
m_ghost_cells_visible = true;
347348
m_text_visible = true;
@@ -944,6 +945,13 @@ LayoutViewBase::configure (const std::string &name, const std::string &value)
944945
min_inst_label_size (n);
945946
return true;
946947

948+
} else if (name == cfg_empty_cell_dimension) {
949+
950+
double n;
951+
tl::from_string (value, n);
952+
empty_cell_dimension (n);
953+
return true;
954+
947955
} else if (name == cfg_cell_box_text_font) {
948956

949957
int n;
@@ -5403,7 +5411,16 @@ LayoutViewBase::min_inst_label_size (int px)
54035411
}
54045412
}
54055413

5406-
void
5414+
void
5415+
LayoutViewBase::empty_cell_dimension (double um)
5416+
{
5417+
if (m_empty_cell_dimension != um) {
5418+
m_empty_cell_dimension = um;
5419+
redraw ();
5420+
}
5421+
}
5422+
5423+
void
54075424
LayoutViewBase::text_visible (bool vis)
54085425
{
54095426
if (m_text_visible != vis) {

src/laybasic/laybasic/layLayoutViewBase.h

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1149,7 +1149,20 @@ class LAYBASIC_PUBLIC LayoutViewBase :
11491149
return m_min_size_for_label;
11501150
}
11511151

1152-
/**
1152+
/**
1153+
* @brief Empty cell dimension for the purpose of label generation setter
1154+
*/
1155+
void empty_cell_dimension (double um);
1156+
1157+
/**
1158+
* @brief Empty cell dimension for the purpose of label generation getter
1159+
*/
1160+
int empty_cell_dimension () const
1161+
{
1162+
return m_empty_cell_dimension;
1163+
}
1164+
1165+
/**
11531166
* @brief Visibility of text objects
11541167
*/
11551168
void text_visible (bool vis);
@@ -2941,6 +2954,7 @@ class LAYBASIC_PUBLIC LayoutViewBase :
29412954
bool m_box_text_transform;
29422955
unsigned int m_box_font;
29432956
int m_min_size_for_label;
2957+
double m_empty_cell_dimension;
29442958
bool m_cell_box_visible;
29452959
bool m_ghost_cells_visible;
29462960

src/laybasic/laybasic/layLayoutViewConfig.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ class LayoutViewBasicConfigDeclaration
5555
options.push_back (std::pair<std::string, std::string> (cfg_current_lib_view, ""));
5656
options.push_back (std::pair<std::string, std::string> (cfg_hide_empty_layers, "false"));
5757
options.push_back (std::pair<std::string, std::string> (cfg_min_inst_label_size, "16"));
58+
options.push_back (std::pair<std::string, std::string> (cfg_empty_cell_dimension, "4"));
5859
options.push_back (std::pair<std::string, std::string> (cfg_cell_box_text_font, "0"));
5960
options.push_back (std::pair<std::string, std::string> (cfg_cell_box_text_transform, "true"));
6061
options.push_back (std::pair<std::string, std::string> (cfg_cell_box_color, "auto"));

0 commit comments

Comments
 (0)