| 54 | } |
| 55 | |
| 56 | void |
| 57 | Renderer::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 | |
| 92 | void |
| 93 | Renderer::draw_propstring (db::properties_id_type id, const db::DPoint &pref, |
no test coverage detected