本文整理汇总了C++中FontPtr::GetHeight方法的典型用法代码示例。如果您正苦于以下问题:C++ FontPtr::GetHeight方法的具体用法?C++ FontPtr::GetHeight怎么用?C++ FontPtr::GetHeight使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FontPtr
的用法示例。
在下文中一共展示了FontPtr::GetHeight方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Paint
void BadUserItem::Paint(Graphics &g, ListArea *theListArea)
{
int aColor = theListArea->GetTextColor();
if(mSelected)
aColor = theListArea->GetSelColor().GetForegroundColor(g,aColor);
int aPaintCol = 0;
bool drawSelection = mSelected;
if(!mIsSimple)
{
aPaintCol = ((MultiListArea*)theListArea)->GetColumnPaintContext();
if(aPaintCol!=-1)
drawSelection = false;
}
if(drawSelection)
{
g.SetColor(theListArea->GetSelColor().GetBackgroundColor(g));
g.FillRect(0,0,theListArea->GetPaintColumnWidth(),mFont->GetHeight());
if(!mIsSimple)
return;
}
if(aPaintCol<0 || aPaintCol>5)
return;
g.SetColor(aColor);
g.SetFont(mFont);
g.DrawString(mColStr[aPaintCol],0,0);
}
示例2: GetTextBoxHeight
unsigned TextBox::GetTextBoxHeight() const
{
FontPtr pFont = Renderer::GetInstance().GetFont(mTextSize);
float height = pFont->GetHeight();
pFont->SetBackToOrigHeight();
return Round(height * mNumTextLines) + 16;
}
示例3: CalcDimensions
void BadUserItem::CalcDimensions(ListArea *theListArea)
{
mFont = theListArea->GetFont();
mHeight = mFont->GetHeight();
}