本文整理汇总了C++中CGumpEditorDoc::GetHueColor方法的典型用法代码示例。如果您正苦于以下问题:C++ CGumpEditorDoc::GetHueColor方法的具体用法?C++ CGumpEditorDoc::GetHueColor怎么用?C++ CGumpEditorDoc::GetHueColor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CGumpEditorDoc
的用法示例。
在下文中一共展示了CGumpEditorDoc::GetHueColor方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Draw
void CGumpPicture::Draw( CDC* dc, CRect rect )
{
CGumpEditorDoc* pDoc = GfxGetGumpDocument();
ASSERT(pDoc);
if (m_eType == RECTANGLE)
{
CBrush brush(pDoc->GetHueColor(GetHueId()));
dc->FillRect(rect, &brush);
}
else
if (m_eType == FRAME)
{
CBrush brush(pDoc->GetHueColor(GetHueId()));
dc->FrameRect(rect, &brush);
}
else
if (m_eType == GUMP && m_pGump)
{
m_pGump->DrawGump(dc, rect, GetZoom());
}
else
{
CGumpEntity::Draw(dc,rect);
}
//dc->SelectStockObject( ANSI_VAR_FONT );
}
示例2: Draw
void CGumpStatic::Draw( CDC* dc, CRect rect )
{
dc->SelectObject( CStdGrfx::dialogBrush() );
dc->SelectObject( CStdGrfx::dialogPen() );
CGumpEditorDoc* pDoc = GfxGetGumpDocument();
ASSERT(pDoc);
//dc->Rectangle( rect );
//LOGFONT lf;
//CFont font;
//GetFont( lf );
//// MS Sans Serif will not scale below 8 pts
//if( GetZoom() < 1 )
// lstrcpy( lf.lfFaceName, _T( "Arial" ) );
//
//font.CreateFontIndirect( &lf );
CFont* pFont = pDoc->GetFont(m_fontId);
CFont* pOld = dc->SelectObject(pFont);
CString strText = GetTitle();
UINT align[] = { TA_LEFT, DT_CENTER, TA_RIGHT };
UINT format = DT_TOP | align[m_textAlign];
if (IsMultiLine()) {
strText = GfxFormatText(strText);
}
else {
format |= DT_SINGLELINE;
}
int oldMode = dc->SetBkMode( TRANSPARENT );
COLORREF color = pDoc->GetHueColor(m_hueId, m_fontId);
COLORREF oldColor = dc->SetTextColor(color);
dc->DrawText( strText, rect, format);
dc->SetBkMode(oldMode);
dc->SetTextColor(oldColor);
dc->SelectStockObject( ANSI_VAR_FONT );
dc->SelectStockObject( BLACK_PEN );
dc->SelectStockObject( WHITE_BRUSH );
}