Exemplo n.º 1
0
void TreeTest::DrawView(Draw& w)
{
	// square the bounds of the window with the bounds of the data
/*	if(IsMapTall())
	{	
		m_rcBnds.right = m_rcBnds.left +
					 m_rcClient.Width()*((double)(m_rcBnds.top-m_rcBnds.bottom)
					 /((double)m_rcClient.Height()));
	}
	else
	{
		m_rcBnds.bottom = m_rcBnds.top - 
							m_rcClient.Height()*((double)(m_rcBnds.Width())
							 /((double)m_rcClient.Width()));
	}
*/	
	m_Scale = GetMapScale();
	
	ImageBuffer ibBk(m_rcClient.Size()); // background drawing buffer
	
	memset(~ibBk, 255, 4 * ibBk.GetLength());
	
	// clear background
//	GraphNix::SetColor(ibBk,SWhite);

	// draw layers - most of the data in the app
//	int i,n = m_pLayers.GetCount();
//	for(i=n-1;i>=0;i--)
//	{
//		if(m_pLayers[i]->m_option) // if it is selected as visible in the tree view
//		{
//			m_pLayers[i]->DrawLayer(w, ibBk,(void*)this);	
//		}
//	}

/*	for()
	{
		
		
		
	}
*/
	m_view = Image(ibBk);

	w.DrawImage(m_rcClient,m_view);

}
Exemplo n.º 2
0
bool
MapWindowProjection::WaypointInScaleFilter(const Waypoint &way_point) const
{
  return (GetMapScale() <= (way_point.is_landable() ? fixed_int_constant(20000) :
                                                      fixed_int_constant(10000)));
}