36 #include <vtkRenderer.h>
37 #include <vtkActor2D.h>
38 #include <vtkTextProperty.h>
39 #include <vtkTextMapper.h>
81 textRep->getActor()->GetPositionCoordinate()->SetCoordinateSystemToNormalizedViewport();
82 textRep->setPosition(pos);
83 textRep->textProperty()->SetJustificationToLeft();
86 textRep->textProperty()->SetJustificationToRight();
88 textRep->textProperty()->SetVerticalJustificationToBottom();
91 textRep->textProperty()->SetVerticalJustificationToTop();
99 if (maxWidth != 0 && vp)
101 textRep->setMaxWidth(maxWidth, vp);
virtual void addRepActorsToViewRenderer(ViewPtr view)
vtkRendererPtr getRenderer()
Vector3D getColorAsVector3D(QColor color)
static boost::shared_ptr< REP > wrap_new(REP *object, QString uid)
boost::shared_ptr< class View > ViewPtr
virtual void removeRepActorsFromViewRenderer(ViewPtr view)
Helper for drawing text in 2D.
void setFontSize(int size)
boost::shared_ptr< class TextDisplay > TextDisplayPtr
void setColor(const QColor &color)
Default implementation of Rep.
Eigen::Vector3d Vector3D
Vector3D is a representation of a point or vector in 3D.
static DisplayTextRepPtr New(const QString &uid="")
TextDisplayPtr addText(const QColor &color, const QString &text, const Vector3D &pos, int maxWidth=0, vtkViewport *vp=NULL)
virtual ~DisplayTextRep()
boost::shared_ptr< class DisplayTextRep > DisplayTextRepPtr
void setText(unsigned i, const QString &text)
std::vector< TextDisplayPtr > mDisplayText