当前位置: 首页>>代码示例>>C++>>正文


C++ Viewport::damage方法代码示例

本文整理汇总了C++中Viewport::damage方法的典型用法代码示例。如果您正苦于以下问题:C++ Viewport::damage方法的具体用法?C++ Viewport::damage怎么用?C++ Viewport::damage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Viewport的用法示例。


在下文中一共展示了Viewport::damage方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: invalidate

void Border::invalidate(Viewport & v, const Allocation & a)
{
    Twips t = a.getTop();
    Twips l = a.getLeft();
    Twips h = a.getHeight();
    Twips w = a.getWidth();
    Twips d = d_thickness;

	// Zeichne einen Rahmen um a herum nach innen ausdehnend um thickness.
    v.damage( Allocation( l, t, w, d ) ); // oben
    v.damage( Allocation( l, t, d, h ) ); // links
    v.damage( Allocation( l + w - d, t, d, h ) ); // rechts
    v.damage( Allocation( l, t + h - d, w, d ) ); // unten
}
开发者ID:Wushaowei001,项目名称:NAF,代码行数:14,代码来源:Border.cpp

示例2: damage

void SelectorCmd::damage()
{
	const Coord left = Math::_min( d_left, d_right );
	const Coord top = Math::_min( d_top, d_bottom );
	const Coord right = Math::_max( d_left, d_right );
	const Coord bottom = Math::_max( d_top, d_bottom );
	Viewport* v = getHandler()->getViewport();
	Allocation a1( left, top, right - left + 20, 20 );
	Allocation a2( left, top, 20, bottom - top + 20 );
	Allocation a3( left, bottom, right - left + 20, 20 );
	Allocation a4( right, top, 20, bottom - top + 20 );
	v->damage( a1 );
	v->damage( a2 );
	v->damage( a3 );
	v->damage( a4 );
}
开发者ID:Wushaowei001,项目名称:NAF,代码行数:16,代码来源:LxSelectorCmd.cpp

示例3: setFocus

void SpecViewer::setFocus(bool on)
{
	if( d_focus == on )
		return;
	d_focus = on;

	Viewport* v = getViewport();
	assert( v );

	const Allocation& a = d_area->getAllocation();
    Coord t = a.getTop();
    Coord l = a.getLeft();
    Coord h = a.getHeight();
    Coord w = a.getWidth();

	// Zeichne einen Rahmen um a herum nach innen ausdehnend um thickness.
    v->damage( l, t, w, TwipsPerPoint ); // oben
    v->damage( l, t, TwipsPerPoint, h ); // links
    v->damage( l + w - s_off - 2 * TwipsPerPoint, t, 3 * TwipsPerPoint, h ); // rechts
    v->damage( l, t + h - s_off - 2 * TwipsPerPoint, w, 3 * TwipsPerPoint ); // unten
}
开发者ID:Wushaowei001,项目名称:NAF,代码行数:21,代码来源:SvSpecViewer.cpp


注:本文中的Viewport::damage方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。