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

Method add_xfill

src/laybasic/laybasic/layBitmapRenderer.cc:170–194  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

168}
169
170void
171BitmapRenderer::add_xfill ()
172{
173 db::DBox box;
174 for (std::vector<lay::RenderEdge>::const_iterator e = m_edges.begin (); e != m_edges.end (); ++e) {
175 if (! e->is_ortho ()) {
176 return;
177 }
178 box += e->p1 ();
179 box += e->p2 ();
180 }
181
182 if (! box.empty () && box.area () > 0.0) {
183
184 for (std::vector<lay::RenderEdge>::const_iterator e = m_edges.begin (); e != m_edges.end (); ++e) {
185 if (point_inside_box (e->p1 (), box) || point_inside_box (e->p2 (), box)) {
186 return;
187 }
188 }
189
190 insert (db::DEdge (box.p1 (), box.p2 ()));
191 insert (db::DEdge (box.lower_right (), box.upper_left ()));
192
193 }
194}
195
196void
197BitmapRenderer::render_texts (lay::CanvasPlane &plane)

Callers

nothing calls this directly

Calls 11

point_inside_boxFunction · 0.85
lower_rightMethod · 0.80
upper_leftMethod · 0.80
insertFunction · 0.70
beginMethod · 0.45
endMethod · 0.45
is_orthoMethod · 0.45
p1Method · 0.45
p2Method · 0.45
emptyMethod · 0.45
areaMethod · 0.45

Tested by

no test coverage detected