JNGL
Public Member Functions | List of all members
TextLine Class Reference

Rectangle shaped text (in contrast to jngl::Text this only represents one line) More...

#include <jngl/TextLine.hpp>

Public Member Functions

 TextLine (Font &, std::string text)
 
void step () override
 Advance object's state.
 
void draw () const override
 Called when drawing a frame.
 
- Public Member Functions inherited from Drawable
 Drawable (const Drawable &)=default
 
Drawableoperator= (const Drawable &)=default
 
 Drawable (Drawable &&)=default
 
Drawableoperator= (Drawable &&)=default
 
virtual void setPos (double x, double y)
 
jngl::Vec2 getCenter () const
 
virtual void setCenter (double x, double y)
 
template<class Vect >
void setCenter (Vect c)
 
double getLeft () const
 Returns the distance from the left side of the screen.
 
void setLeft (double x)
 
double getTop () const
 Returns the distance from the top of the screen.
 
void setTop (double y)
 
double getRight () const
 Returns the distance from the right side of the screen.
 
void setRight (double x)
 
double getBottom () const
 Returns the distance from the bottom of the screen.
 
void setBottom (double y)
 
double getX () const
 
void setX (double)
 
double getY () const
 
void setY (double)
 
Vec2 getSize () const
 Returns {width, height} in screen coordinates.
 
float getWidth () const
 Returns the width in screen coordinates.
 
float getHeight () const
 Returns the height in screen coordinates.
 
void drawBoundingBox () const
 
bool contains (jngl::Vec2 point) const
 Returns whether point is inside the bounding box.
 

Additional Inherited Members

- Protected Attributes inherited from Drawable
Vec2 position
 
float width = 0
 
float height = 0
 

Detailed Description

Rectangle shaped text (in contrast to jngl::Text this only represents one line)

Definition at line 17 of file TextLine.hpp.

Inheritance diagram for TextLine:
[legend]
Collaboration diagram for TextLine:
[legend]

The documentation for this class was generated from the following file: