本文整理汇总了C++中FontInfo::SetPointSize方法的典型用法代码示例。如果您正苦于以下问题:C++ FontInfo::SetPointSize方法的具体用法?C++ FontInfo::SetPointSize怎么用?C++ FontInfo::SetPointSize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FontInfo
的用法示例。
在下文中一共展示了FontInfo::SetPointSize方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DrawPgHeader
void View::DrawPgHeader(DeviceContext *dc, RunningElement *pgHeader)
{
assert(dc);
assert(pgHeader);
dc->StartGraphic(pgHeader, "", pgHeader->GetUuid());
FontInfo pgHeadTxt;
TextDrawingParams params;
// If we have not timestamp
params.m_x = pgHeader->GetDrawingX();
params.m_y = pgHeader->GetDrawingY();
params.m_width = pgHeader->GetWidth();
params.m_alignment = HORIZONTALALIGNMENT_NONE;
params.m_laidOut = true;
params.m_pointSize = m_doc->GetDrawingLyricFont(100)->GetPointSize();
pgHeadTxt.SetPointSize(params.m_pointSize);
dc->SetBrush(m_currentColour, AxSOLID);
dc->SetFont(&pgHeadTxt);
DrawRunningChildren(dc, pgHeader, params);
dc->ResetFont();
dc->ResetBrush();
dc->EndGraphic(pgHeader, this);
}
示例2: DrawLyricString
void View::DrawLyricString ( DeviceContext *dc, int x, int y, std::wstring s, int staffSize)
{
assert( dc );
dc->StartText( ToDeviceContextX( x ), ToDeviceContextY( y ) );
std::wistringstream iss( s );
std::wstring token;
while( std::getline( iss, token, L'_' ))
{
dc->DrawText( UTF16to8( token.c_str() ), token );
// no _
if (iss.eof())
break;
FontInfo vrvTxt;
vrvTxt.SetFaceName("VerovioText");
vrvTxt.SetPointSize( m_doc->GetDrawingLyricFont(staffSize)->GetPointSize() );
dc->SetFont( &vrvTxt );
dc->VrvTextFont();
std::wstring str;
str.push_back(VRV_TEXT_E551);
dc->DrawText( UTF16to8( str.c_str() ), str );
dc->ResetFont();
}
//std::wcout << std::endl;
dc->EndText( );
}
示例3: DrawRend
void View::DrawRend(DeviceContext *dc, Rend *rend, int x, int y, bool &setX, bool &setY)
{
assert(dc);
assert(rend);
dc->StartTextGraphic(rend, "", rend->GetUuid());
FontInfo rendFont;
bool customFont = false;
if (rend->HasFontsize()) {
customFont = true;
rendFont.SetPointSize(rend->GetFontsize());
}
if (customFont) dc->SetFont(&rendFont);
DrawTextChildren(dc, rend, x, y, setX, setY);
if (customFont) dc->ResetFont();
dc->EndTextGraphic(rend, this);
}