15 #include <vtkRenderer.h> 16 #include <vtkActor2D.h> 17 #include <vtkTextProperty.h> 18 #include <vtkTextMapper.h> 60 textRep->getActor()->GetPositionCoordinate()->SetCoordinateSystemToNormalizedViewport();
61 textRep->setPosition(pos);
62 textRep->textProperty()->SetJustificationToLeft();
65 textRep->textProperty()->SetJustificationToRight();
67 textRep->textProperty()->SetVerticalJustificationToBottom();
70 textRep->textProperty()->SetVerticalJustificationToTop();
78 if (maxWidth != 0 && vp)
80 textRep->setMaxWidth(maxWidth, vp);
111 if (size !=
mDisplayText[i]->textProperty()->GetFontSize())
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
Namespace for all CustusX production code.