Continue adding opengl font support.
This commit is contained in:
parent
649079a5c7
commit
eef93efc29
37 changed files with 530 additions and 157 deletions
43
src/fonts/FontGlyph.cpp
Normal file
43
src/fonts/FontGlyph.cpp
Normal file
|
@ -0,0 +1,43 @@
|
|||
#include "FontGlyph.h"
|
||||
|
||||
FontGlyph::FontGlyph(unsigned width, unsigned height, unsigned bearingX, unsigned bearingY,
|
||||
unsigned advanceX, std::unique_ptr<Image<unsigned char> > image)
|
||||
: mImage(std::move(image)),
|
||||
mWidth(width),
|
||||
mHeight(height),
|
||||
mBearingX(mBearingX),
|
||||
mBearingY(mBearingY),
|
||||
mAdvanceX(mAdvanceX)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
Image<unsigned char>* FontGlyph::getImage() const
|
||||
{
|
||||
return mImage.get();
|
||||
}
|
||||
|
||||
unsigned FontGlyph::getWidth() const
|
||||
{
|
||||
return mWidth;
|
||||
}
|
||||
|
||||
unsigned FontGlyph::getHeight() const
|
||||
{
|
||||
return mHeight;
|
||||
}
|
||||
|
||||
unsigned FontGlyph::getBearingX() const
|
||||
{
|
||||
return mBearingX;
|
||||
}
|
||||
|
||||
unsigned FontGlyph::getBearingY() const
|
||||
{
|
||||
return mBearingY;
|
||||
}
|
||||
|
||||
unsigned FontGlyph::getAdvanceX() const
|
||||
{
|
||||
return mAdvanceX;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue