Go to the documentation of this file.
16 #ifndef SURGSIM_GRAPHICS_TEXTREPRESENTATION_H
17 #define SURGSIM_GRAPHICS_TEXTREPRESENTATION_H
55 virtual void setFont(std::shared_ptr<SurgSim::Framework::Asset> font) = 0;
58 virtual std::shared_ptr<Font>
getFont()
const = 0;
66 virtual void getLocation(
double* x,
double* y)
const = 0;
145 #endif // SURGSIM_GRAPHICS_TEXTREPRESENTATION_H
virtual SurgSim::Math::Vector4d getColor() const =0
virtual bool isDrawingBackground() const =0
virtual void setUseScreenSpace(bool value)=0
If set to true all the coordinate values are in screen-space coordinates (i.e.
virtual std::string getText() const =0
virtual void setBackgroundColor(Math::Vector4d color)=0
Set the color of the background (if drawn)
virtual void setFontSize(double size)=0
Set the vertical size of the font.
virtual void setLocation(double x, double y)=0
Sets the location in screen space.
virtual std::shared_ptr< Font > getFont() const =0
virtual void setMaximumWidth(double width)=0
Sets a maximum width to the text display, the text should be broken up into multiple lines if the it ...
virtual ~TextRepresentation()
Destructor.
Definition: TextRepresentation.h:47
virtual void setFont(std::shared_ptr< SurgSim::Framework::Asset > font)=0
Replace the current font with the one passed.
virtual void setBackgroundMargin(double margin)=0
Set the margin between background and text.
Definition: CompoundShapeToGraphics.cpp:29
virtual bool isUsingScreenSpace() const =0
Eigen::Matrix< double, 4, 1 > Vector4d
A 4D vector of doubles.
Definition: Vector.h:61
virtual void setText(const std::string &text)=0
Sets the text to be shown on the screen.
A text to be displayed on the screen in screen space coordinates, use setPose() to set the position b...
Definition: TextRepresentation.h:39
virtual void loadFont(const std::string &fileName)=0
Load the font with the given file name, this will overwrite the current font.
virtual void setDrawBackground(bool value)=0
Draw a filled background behind the text.
TextRepresentation(const std::string name)
Constructor.
Definition: TextRepresentation.cpp:27
virtual Math::Vector4d getBackgroundColor()=0
virtual double getBackgroundMargin() const =0
virtual void setColor(SurgSim::Math::Vector4d color)=0
Set the color for the text.
Base graphics representation class, which defines the interface that all graphics representations mus...
Definition: Representation.h:39
string(TOUPPER ${DEVICE} DEVICE_UPPER_CASE) option(BUILD_DEVICE_$
Definition: CMakeLists.txt:38
virtual void getLocation(double *x, double *y) const =0
Gets the location in screen space.
virtual double getFontSize() const =0
virtual SurgSim::DataStructures::OptionalValue< double > getOptionalMaximumWidth()=0
Get the current status of the width.
virtual double getMaximumWidth()=0
virtual void setOptionalMaximumWidth(SurgSim::DataStructures::OptionalValue< double > width)=0
Optionally sets a maximum width to the text display, the text should be broken up into multiple lines...