| 125 | } |
| 126 | |
| 127 | vtkVector2f vtkGraphItem::EdgePosition(vtkIdType edgeIdx, vtkIdType point) |
| 128 | { |
| 129 | double* p; |
| 130 | if (point == 0) |
| 131 | { |
| 132 | vtkPoints* points = this->Graph->GetPoints(); |
| 133 | p = points->GetPoint(this->Graph->GetSourceVertex(edgeIdx)); |
| 134 | } |
| 135 | else if (point == this->NumberOfEdgePoints(edgeIdx) - 1) |
| 136 | { |
| 137 | vtkPoints* points = this->Graph->GetPoints(); |
| 138 | p = points->GetPoint(this->Graph->GetTargetVertex(edgeIdx)); |
| 139 | } |
| 140 | else |
| 141 | { |
| 142 | p = this->Graph->GetEdgePoint(edgeIdx, point - 1); |
| 143 | } |
| 144 | return vtkVector2f(static_cast<float>(p[0]), static_cast<float>(p[1])); |
| 145 | } |
| 146 | |
| 147 | float vtkGraphItem::EdgeWidth(vtkIdType vtkNotUsed(line), vtkIdType vtkNotUsed(point)) |
| 148 | { |
no test coverage detected