mirror of https://github.com/CGAL/cgal
Add a virtual function for drawing a vertex instead of a point (associated to a vertex)
This commit is contained in:
parent
e74d9a59eb
commit
c4052f224b
|
|
@ -97,6 +97,7 @@ protected:
|
|||
virtual void drawAll(QPainter *painter);
|
||||
void paintVertices(QPainter *painter);
|
||||
void paintOneVertex(const typename T::Point& point);
|
||||
virtual void paintVertex(typename T::Vertex_handle vh);
|
||||
void updateBoundingBox();
|
||||
|
||||
T * t;
|
||||
|
|
@ -152,7 +153,7 @@ TriangulationGraphicsItem<T>::operator()(typename T::Face_handle fh)
|
|||
}
|
||||
if(visible_vertices) {
|
||||
for (int i=0; i<3; i++) {
|
||||
paintOneVertex(fh->vertex(i)->point());
|
||||
paintVertex(fh->vertex(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -205,6 +206,19 @@ TriangulationGraphicsItem<T>::paintOneVertex(const typename T::Point& point)
|
|||
m_painter->setMatrix(matrix);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void
|
||||
TriangulationGraphicsItem<T>::paintVertex(typename T::Vertex_handle vh)
|
||||
{
|
||||
Converter<Geom_traits> convert;
|
||||
|
||||
m_painter->setPen(this->verticesPen());
|
||||
QMatrix matrix = m_painter->matrix();
|
||||
m_painter->resetMatrix();
|
||||
m_painter->drawPoint(matrix.map(convert(vh->point())));
|
||||
m_painter->setMatrix(matrix);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void
|
||||
TriangulationGraphicsItem<T>::paint(QPainter *painter,
|
||||
|
|
|
|||
Loading…
Reference in New Issue