SDLPP: Formatting

This commit is contained in:
zvon 2021-03-15 14:50:40 +01:00
parent 4cd351c7a3
commit 6cfe2046d4
4 changed files with 16 additions and 5 deletions

View File

@ -1,8 +1,10 @@
#include "sdlpp_fontconfiguration.hpp"
namespace SDLPP {
FontConfiguration::FontConfiguration( std::shared_ptr< Font > font, const std::string &color,
const std::string &outline_color, double outline_size ) {
FontConfiguration::FontConfiguration( std::shared_ptr< Font > font,
const std::string &color,
const std::string &outline_color,
double outline_size ) {
_font = font;
_color = color;
_outline_color = outline_color;
@ -32,4 +34,4 @@ void FontConfiguration::setColor( const std::string &color ) {
void FontConfiguration::setOutlineColor( const std::string &outline_color ) {
_outline_color = outline_color;
}
}
} // namespace SDLPP

View File

@ -28,6 +28,7 @@ public:
updateMost();
return *this;
}
void updateMost() {
if ( _start.getY() < _end.getY() ) {
top = &_start;
@ -44,28 +45,36 @@ public:
right = &_start;
}
}
const Vec2D< T > &getStart() const {
return _start;
}
const Vec2D< T > &getEnd() const {
return _end;
}
double length() const {
return vecDistance( _start, _end );
}
double lengthSquared() const {
return vecDistanceSquared( _start, _end );
}
void setInfinite( bool infinite ) {
_infinite = infinite;
}
bool isInfinite() {
return _infinite;
}
void add( const Vec2D< T > &vec ) {
_start += vec;
_end += vec;
}
const Vec2D< T > &topmost() const {
return *top;
}