1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
|
#include "Font.h"
#include "Image.h"
using namespace Sexy;
Font::Font()
{
mAscent = 0;
mHeight = 0;
mAscentPadding = 0;
mLineSpacingOffset = 0;
}
Font::Font(const Font& theFont) :
mAscent(theFont.mAscent),
mHeight(theFont.mHeight),
mAscentPadding(theFont.mAscentPadding),
mLineSpacingOffset(theFont.mLineSpacingOffset)
{
}
Font::~Font()
{
}
int Font::GetAscent()
{
return mAscent;
}
int Font::GetAscentPadding()
{
return mAscentPadding;
}
int Font::GetDescent()
{
return mHeight - mAscent;
}
int Font::GetHeight()
{
return mHeight;
}
int Font::GetLineSpacingOffset()
{
return mLineSpacingOffset;
}
int Font::GetLineSpacing()
{
return mHeight + mLineSpacingOffset;
}
int Font::StringWidth(const SexyString& theString)
{
return 0;
}
int Font::CharWidth(SexyChar theChar)
{
SexyString aString(1, theChar);
return StringWidth(aString);
}
int Font::CharWidthKern(SexyChar theChar, SexyChar thePrevChar)
{
return CharWidth(theChar);
}
void Font::DrawString(Graphics* g, int theX, int theY, const SexyString& theString, const Color& theColor, const Rect& theClipRect)
{
}
|