Пример #1
0
	void Scene::renderDbg( Graphics2D& g , Vec2f const& pos , int index )
	{
		bool isEven = mLevel.isEvenLayer( index );

		Vec2f cPos = mLevel.calcCellCenterPos( index );
		g.setBrush( ColorKey3( 0 , 0 , 255 ) );
		g.drawCircle( pos + cPos , int( g_BubbleRadius - 10) );
		g.setBrush( ColorKey3( 255 , 255 , 0 ) );

		for( int i = 0 ; i < NUM_LINK_DIR ; ++i )
		{
			int linkIdx = mLevel.getLinkCellIndex( index , LinkDir(i) , isEven );
			//BubbleCell& linkCell = mLevel.getCell( linkIdx );
			Vec2f cPos = mLevel.calcCellCenterPos( linkIdx );

			g.drawCircle( pos + cPos , int( g_BubbleRadius -10) );
		}


		//g.setBrush( ColorKey3( 255 , 0 , 0 ) );
		//for( int i = 0 ; i < mLevel.mNumFallCell ; ++i )
		//{
		//	Vec2f cPos = mLevel.calcCellCenterPos( mLevel.mIndexFallCell[i] );
		//	g.drawCircle( pos + cPos , g_BubbleRadius - 5 );
		//}
	}
Пример #2
0
void RenderUtility::setBrush( Graphics2D& g , int color , int type )
{
	g.setBrush( getColorBrush( color , type ) );
}