2022-10-09 05:13:17 +00:00
|
|
|
#ifndef _CFONTIMAGEDEF
|
|
|
|
#define _CFONTIMAGEDEF
|
2022-10-01 08:32:56 +00:00
|
|
|
|
|
|
|
#include <Kyoto/Graphics/CTexture.hpp>
|
|
|
|
#include <Kyoto/Math/CVector2f.hpp>
|
|
|
|
#include <Kyoto/TToken.hpp>
|
|
|
|
#include <rstl/vector.hpp>
|
|
|
|
|
|
|
|
class CTexture;
|
|
|
|
class CVector2f;
|
|
|
|
class CFontImageDef {
|
|
|
|
public:
|
|
|
|
CFontImageDef(const TToken< CTexture >& texture, const CVector2f& cropFactor);
|
|
|
|
CFontImageDef(const rstl::vector< TToken< CTexture > >& texture, float fps,
|
|
|
|
const CVector2f& cropFactor);
|
2022-10-01 19:00:38 +00:00
|
|
|
|
2022-10-01 08:32:56 +00:00
|
|
|
bool IsLoaded() const;
|
2022-10-01 19:00:38 +00:00
|
|
|
// inline short GetWidth() { }
|
|
|
|
int GetHeight() {
|
|
|
|
TToken< CTexture > tex = mTextures[0];
|
2022-10-01 08:32:56 +00:00
|
|
|
return tex.GetT()->GetHeight() * mCropFactor.GetY();
|
|
|
|
}
|
|
|
|
int CalculateBaseline();
|
|
|
|
|
|
|
|
private:
|
|
|
|
float mFPS;
|
|
|
|
rstl::vector< TToken< CTexture > > mTextures;
|
|
|
|
CVector2f mCropFactor;
|
|
|
|
};
|
|
|
|
|
2022-10-09 05:13:17 +00:00
|
|
|
#endif // _CFONTIMAGEDEF
|