mirror of
https://github.com/Kiritow/MiniEngine.git
synced 2024-03-22 13:11:22 +08:00
Update Font
This commit is contained in:
parent
2f027b7925
commit
cced27fc53
|
@ -10,12 +10,12 @@ void Font::_set(TTF_Font* p)
|
|||
// private
|
||||
void Font::_clear()
|
||||
{
|
||||
_font.reset();
|
||||
_font.release();
|
||||
}
|
||||
// private
|
||||
TTF_Font* Font::_get() const
|
||||
{
|
||||
return _font.get();
|
||||
return const_cast<TTF_Font*>(_font.get());
|
||||
}
|
||||
|
||||
Font::Font(const std::string& FontFileName, size_t size)
|
||||
|
@ -400,5 +400,5 @@ void Font::release()
|
|||
{
|
||||
_clear();
|
||||
}
|
||||
} /// End of namespace MiniEngine
|
||||
} /// End of namespace MiniEngine
|
||||
|
||||
|
|
|
@ -8,9 +8,11 @@
|
|||
#include "Renderer.h"
|
||||
#include <vector>
|
||||
#include "__Plugin.h"
|
||||
#include "__Noncopyable.h"
|
||||
#include "_handler.h"
|
||||
namespace MiniEngine
|
||||
{
|
||||
class Font
|
||||
class Font : public NonCopyable
|
||||
{
|
||||
public:
|
||||
Font() = default;
|
||||
|
@ -116,12 +118,13 @@ private:
|
|||
void _real_setFontStyle(int);
|
||||
int _style_caster(FontStyle);
|
||||
|
||||
std::shared_ptr<TTF_Font> _font;
|
||||
res_ptr<TTF_Font> _font;
|
||||
|
||||
void _set(TTF_Font*);
|
||||
void _clear();
|
||||
TTF_Font* _get() const;
|
||||
|
||||
friend class _internal::Plugin;
|
||||
};
|
||||
} /// End of namespace MiniEngine
|
||||
} /// End of namespace MiniEngine
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user