本文整理汇总了C++中wxDC::ResetBoundingBox方法的典型用法代码示例。如果您正苦于以下问题:C++ wxDC::ResetBoundingBox方法的具体用法?C++ wxDC::ResetBoundingBox怎么用?C++ wxDC::ResetBoundingBox使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类wxDC
的用法示例。
在下文中一共展示了wxDC::ResetBoundingBox方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CalculateDCRect
void Route::CalculateDCRect( wxDC& dc_route, wxRect *prect, ViewPort &VP )
{
dc_route.ResetBoundingBox();
dc_route.DestroyClippingRegion();
// Draw the route in skeleton form on the dc
// That is, draw only the route points, assuming that the segements will
// always be fully contained within the resulting rectangle.
// Can we prove this?
if( m_bVisible ) {
wxRoutePointListNode *node = pRoutePointList->GetFirst();
while( node ) {
RoutePoint *prp2 = node->GetData();
bool blink_save = prp2->m_bBlink;
prp2->m_bBlink = false;
ocpnDC odc_route( dc_route );
prp2->Draw( odc_route, NULL );
prp2->m_bBlink = blink_save;
node = node->GetNext();
}
}
// Retrieve the drawing extents
prect->x = dc_route.MinX() - 1;
prect->y = dc_route.MinY() - 1;
prect->width = dc_route.MaxX() - dc_route.MinX() + 2;
prect->height = dc_route.MaxY() - dc_route.MinY() + 2;
}
示例2: CalculateDCRect
void Route::CalculateDCRect( wxDC& dc_route, wxRect *prect )
{
dc_route.ResetBoundingBox();
dc_route.DestroyClippingRegion();
wxRect update_rect;
// Draw the route in skeleton form on the dc
// That is, draw only the route points, assuming that the segements will
// always be fully contained within the resulting rectangle.
// Can we prove this?
if( m_bVisible ) {
wxRoutePointListNode *node = pRoutePointList->GetFirst();
while( node ) {
RoutePoint *prp2 = node->GetData();
bool blink_save = prp2->m_bBlink;
prp2->m_bBlink = false;
ocpnDC odc_route( dc_route );
prp2->Draw( odc_route, NULL );
prp2->m_bBlink = blink_save;
wxRect r = prp2->CurrentRect_in_DC ;
r.Inflate(m_hiliteWidth, m_hiliteWidth); // allow for large hilite circles at segment ends
update_rect.Union( r );
node = node->GetNext();
}
}
*prect = update_rect;
}
示例3: CalculateDCRect
void RoutePoint::CalculateDCRect( wxDC& dc, wxRect *prect )
{
dc.ResetBoundingBox();
dc.DestroyClippingRegion();
// Draw the mark on the dc
ocpnDC odc( dc );
Draw( odc, NULL );
// Retrieve the drawing extents
prect->x = dc.MinX() - 1;
prect->y = dc.MinY() - 1;
prect->width = dc.MaxX() - dc.MinX() + 2; // Mouse Poop?
prect->height = dc.MaxY() - dc.MinY() + 2;
}