htmlhorizontalrulesection.cpp
来自「hl2 source code. Do not use it illegal.」· C++ 代码 · 共 49 行
CPP
49 行
/*----------------------------------------------------------------------
Copyright (c) 1998 Gipsysoft. All Rights Reserved.
Please see the file "licence.txt" for licencing details.
File: HTMLHorizontalRuleSection.cpp
Owner: russf@gipsysoft.com
Purpose: Horizontal rule HTML section.
----------------------------------------------------------------------*/
#include "stdafx.h"
#include "HTMLHorizontalRuleSection.h"
CHTMLHorizontalRuleSection::CHTMLHorizontalRuleSection( CParentSection *psect, bool bNoShade, COLORREF crColor )
: CHTMLSectionABC( psect )
, m_bNoShade( bNoShade )
, m_crColor( crColor )
{
if( !bNoShade )
{
Transparent( true );
}
}
CHTMLHorizontalRuleSection::~CHTMLHorizontalRuleSection()
{
}
void CHTMLHorizontalRuleSection::OnDraw( CDrawContext &dc )
{
#ifdef DRAW_DEBUG
CHTMLSectionABC::OnDraw( dc );
#endif // DRAW_DEBUG
if( m_bNoShade )
{
dc.FillRect( *this, m_crColor );
}
else
{
// REVIEW - russf - bogus bit of OS specific drawing *not* in the right place.
if( Height() == 2 )
::DrawEdge( dc.GetSafeHdc(), *this, BDR_SUNKENOUTER, BF_TOP | BF_BOTTOM );
else
::DrawEdge( dc.GetSafeHdc(), *this, BDR_SUNKENOUTER, BF_RECT );
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?