SDLPP: Split fontconfiguration into 2 files
This commit is contained in:
parent
406186d8bb
commit
8b3eee0673
@ -28,7 +28,7 @@ SDLPPLIBRARY = libsdlpp.dll
|
||||
LIBRARYFLAGS =
|
||||
endif
|
||||
|
||||
OBJECTFILES = sdlpp_circlecolider.${OBJEXT} sdlpp_circlerenderer.${OBJEXT} sdlpp_collision.${OBJEXT} sdlpp_common.${OBJEXT} sdlpp_font.${OBJEXT} sdlpp_linerenderer.${OBJEXT} sdlpp_rectcolider.${OBJEXT} sdlpp_rectrenderer.${OBJEXT} sdlpp_renderer.${OBJEXT} sdlpp_renderobject.${OBJEXT} sdlpp_scene.${OBJEXT} sdlpp_textrenderer.${OBJEXT} sdlpp_texture.${OBJEXT} sdlpp_window.${OBJEXT}
|
||||
OBJECTFILES = sdlpp_circlecolider.${OBJEXT} sdlpp_circlerenderer.${OBJEXT} sdlpp_collision.${OBJEXT} sdlpp_common.${OBJEXT} sdlpp_font.${OBJEXT} sdlpp_linerenderer.${OBJEXT} sdlpp_rectcolider.${OBJEXT} sdlpp_rectrenderer.${OBJEXT} sdlpp_renderer.${OBJEXT} sdlpp_renderobject.${OBJEXT} sdlpp_scene.${OBJEXT} sdlpp_textrenderer.${OBJEXT} sdlpp_texture.${OBJEXT} sdlpp_window.${OBJEXT} sdlpp_fontconfiguration.${OBJEXT}
|
||||
|
||||
all: ${SDLPPLIBRARY}
|
||||
|
||||
|
35
sdlpp/sdlpp_fontconfiguration.cpp
Normal file
35
sdlpp/sdlpp_fontconfiguration.cpp
Normal file
@ -0,0 +1,35 @@
|
||||
#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 ) {
|
||||
_font = font;
|
||||
_color = color;
|
||||
_outline_color = outline_color;
|
||||
_outline_size = outline_size;
|
||||
}
|
||||
|
||||
const std::shared_ptr< Font > &FontConfiguration::getFont() {
|
||||
return _font;
|
||||
}
|
||||
|
||||
const std::string &FontConfiguration::getColor() {
|
||||
return _color;
|
||||
}
|
||||
|
||||
const std::string &FontConfiguration::getOutlineColor() {
|
||||
return _outline_color;
|
||||
}
|
||||
|
||||
const double &FontConfiguration::getOutlineSize() {
|
||||
return _outline_size;
|
||||
}
|
||||
|
||||
void FontConfiguration::setColor( const std::string &color ) {
|
||||
_color = color;
|
||||
}
|
||||
|
||||
void FontConfiguration::setOutlineColor( const std::string &outline_color ) {
|
||||
_outline_color = outline_color;
|
||||
}
|
||||
}
|
@ -10,36 +10,13 @@ class SDLPPSCOPE FontConfiguration {
|
||||
public:
|
||||
FontConfiguration() = delete;
|
||||
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;
|
||||
_outline_size = outline_size;
|
||||
}
|
||||
|
||||
const std::shared_ptr< Font > &getFont() {
|
||||
return _font;
|
||||
}
|
||||
|
||||
const std::string &getColor() {
|
||||
return _color;
|
||||
}
|
||||
|
||||
const std::string &getOutlineColor() {
|
||||
return _outline_color;
|
||||
}
|
||||
|
||||
const double &getOutlineSize() {
|
||||
return _outline_size;
|
||||
}
|
||||
|
||||
void setColor( const std::string &color ) {
|
||||
_color = color;
|
||||
}
|
||||
|
||||
void setOutlineColor( const std::string &outline_color ) {
|
||||
_outline_color = outline_color;
|
||||
}
|
||||
const std::string &outline_color, double outline_size );
|
||||
const std::shared_ptr< Font > &getFont();
|
||||
const std::string &getColor();
|
||||
const std::string &getOutlineColor();
|
||||
const double &getOutlineSize();
|
||||
void setColor( const std::string &color );
|
||||
void setOutlineColor( const std::string &outline_color );
|
||||
|
||||
private:
|
||||
std::shared_ptr< Font > _font;
|
||||
|
Loading…
Reference in New Issue
Block a user