Dualie
|
A simple class responsible for the line object. More...
#include <Line.hpp>
Public Member Functions | |
Line (dl::Vector2f startingPosition, dl::Vector2f endingPosition, float thickness=1) | |
void | draw (const Vector2f &viewOffset) override |
Draws the drawable to the screen. | |
void | setStartingPosition (const dl::Vector2f &startingPosition) |
Sets the starting position of the line. | |
void | setEndingPosition (const dl::Vector2f &endingPosition) |
Sets the ending position of the line. | |
void | setThickness (float thickness) |
Sets the thickness of the line. | |
void | setColor (const dl::Color &color) |
Sets the color of the line. | |
const dl::Vector2f & | getStartingPosition () |
const dl::Vector2f & | getEndingPosition () |
float | getThickness () |
const dl::Color & | getColor () |
![]() | |
void | viewShouldAffect (bool effective) |
Set whether the current view should affect the position of the drawable. Otherwise, its position on the screen will be absolute. | |
void | setDepth (float depth) |
Sets the depth of the drawable for 3d. This simply corresponds to the X offset calculated for the 2 separate top screens. Larger objects will require a deeper depth for the 3d effect to be noticable. A positive value will cause the drawable to sink into the screen, while a negative value will cause it to pop out. | |
const float & | getDepth () const |
Additional Inherited Members | |
![]() | |
bool | m_bViewDoesAffect = true |
float | m_depth = 0.0f |
A simple class responsible for the line object.
|
overridevirtual |
Draws the drawable to the screen.
viewOffset | The offset of the current view to be used for internal drawable positioning |
Implements dl::Drawable.
const dl::Color & dl::Line::getColor | ( | ) |
const dl::Vector2f & dl::Line::getEndingPosition | ( | ) |
const dl::Vector2f & dl::Line::getStartingPosition | ( | ) |
float dl::Line::getThickness | ( | ) |
void dl::Line::setColor | ( | const dl::Color & | color | ) |
Sets the color of the line.
thickness | The color of the line |
void dl::Line::setEndingPosition | ( | const dl::Vector2f & | endingPosition | ) |
Sets the ending position of the line.
startingPosition | The ending position of the line |
void dl::Line::setStartingPosition | ( | const dl::Vector2f & | startingPosition | ) |
Sets the starting position of the line.
startingPosition | The starting position of the line |
void dl::Line::setThickness | ( | float | thickness | ) |
Sets the thickness of the line.
thickness | The thickness of the line |