| 1012 | } |
| 1013 | |
| 1014 | void wxShape::DrawLinks(wxDC& dc, int attachment, bool recurse) |
| 1015 | { |
| 1016 | if (!m_visible) |
| 1017 | return; |
| 1018 | |
| 1019 | wxNode *current = m_lines.GetFirst(); |
| 1020 | while (current) |
| 1021 | { |
| 1022 | wxLineShape *line = (wxLineShape *)current->GetData(); |
| 1023 | if (attachment == -1 || |
| 1024 | (line->GetTo() == this && line->GetAttachmentTo() == attachment) || |
| 1025 | (line->GetFrom() == this && line->GetAttachmentFrom() == attachment)) |
| 1026 | line->Draw(dc); |
| 1027 | current = current->GetNext(); |
| 1028 | } |
| 1029 | if (recurse) |
| 1030 | { |
| 1031 | wxNode *node = m_children.GetFirst(); |
| 1032 | while (node) |
| 1033 | { |
| 1034 | wxShape *child = (wxShape *)node->GetData(); |
| 1035 | child->DrawLinks(dc, attachment, recurse); |
| 1036 | node = node->GetNext(); |
| 1037 | } |
| 1038 | } |
| 1039 | } |
| 1040 | |
| 1041 | // Returns true if pt1 <= pt2 in the sense that one point comes before another on an |
| 1042 | // edge of the shape. |
no test coverage detected