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

Method draw_propstring

src/laybasic/laybasic/layRenderer.cc:56–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54}
55
56void
57Renderer::draw_propstring (const db::Shape &shape, lay::CanvasPlane *text, const db::CplxTrans &trans)
58{
59 if (! shape.has_prop_id ()) {
60 return;
61 }
62
63 db::DPoint dp;
64
65 if (shape.is_text ()) {
66 dp = trans * (db::Point () + shape.text_trans ().disp ());
67 } else if (shape.is_box ()) {
68 dp = trans (shape.box ().p1 ());
69 } else if (shape.is_point ()) {
70 dp = trans (shape.point ());
71 } else if (shape.is_polygon ()) {
72 db::Shape::polygon_edge_iterator e = shape.begin_edge ();
73 dp = trans ((*e).p1 ());
74 } else if (shape.is_edge ()) {
75 dp = trans (shape.edge ().p1 ());
76 } else if (shape.is_path ()) {
77 dp = trans (*shape.begin_point ());
78 } else {
79 return;
80 }
81
82 if (shape.has_prop_id () && text && (m_draw_properties || m_draw_description_property)) {
83 if (m_draw_properties) {
84 draw_propstring (shape.prop_id (), dp, text, trans);
85 }
86 if (m_draw_description_property) {
87 draw_description_propstring (shape.prop_id (), dp, text, trans);
88 }
89 }
90}
91
92void
93Renderer::draw_propstring (db::properties_id_type id, const db::DPoint &pref,

Callers 3

draw_cell_propertiesMethod · 0.80
draw_text_layerMethod · 0.80
renderMethod · 0.80

Calls 15

propertiesFunction · 0.85
text_transMethod · 0.80
is_pointMethod · 0.80
begin_pointMethod · 0.80
to_mapMethod · 0.80
PointClass · 0.50
transFunction · 0.50
dispMethod · 0.45
is_boxMethod · 0.45
p1Method · 0.45
boxMethod · 0.45
begin_edgeMethod · 0.45

Tested by

no test coverage detected