本文整理汇总了C++中Patches::sub方法的典型用法代码示例。如果您正苦于以下问题:C++ Patches::sub方法的具体用法?C++ Patches::sub怎么用?C++ Patches::sub使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Patches
的用法示例。
在下文中一共展示了Patches::sub方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: _onMaskPatches
void Panel::_onMaskPatches( Patches& patches, const Rect& geo, const Rect& clip, WgBlendMode blendMode )
{
//TODO: Don't just check isOpaque() globally, check rect by rect.
if( (m_bOpaque && blendMode == WG_BLENDMODE_BLEND) || blendMode == WG_BLENDMODE_OPAQUE )
{
patches.sub( Rect(geo,clip) );
return;
}
switch( m_maskOp )
{
case WG_MASKOP_RECURSE:
{
Rect childGeo;
PanelHook * p = static_cast<PanelHook*>(_firstHookWithGeo( childGeo ));
while(p)
{
if( p->isVisible() )
p->_widget()->_onMaskPatches( patches, childGeo + geo.pos(), clip, blendMode );
p = static_cast<PanelHook*>(_nextHookWithGeo( childGeo, p ));
}
break;
}
case WG_MASKOP_SKIP:
break;
case WG_MASKOP_MASK:
patches.sub( Rect(geo,clip) );
break;
}
}
示例2: _maskPatches
void Widget::_maskPatches( Patches& patches, const Rect& geo, const Rect& clip, BlendMode blendMode )
{
if( (m_bOpaque && blendMode == BlendMode::Blend) || blendMode == BlendMode::Replace )
{
patches.sub( Rect( geo, clip ) );
}
}