void ScrollControl::Render( Skin::Base* skin )
{
#if 0
	// Debug render - this shouldn't render ANYTHING REALLY - it should be up to the parent!
	Gwen::Rect rect = GetRenderBounds();
	Gwen::Renderer::Base* render = skin->GetRender();
	render->SetDrawColor( Gwen::Color( 255, 255, 0, 100 ) );
	render->DrawFilledRect( rect );
	render->SetDrawColor( Gwen::Color( 255, 0, 0, 100 ) );
	render->DrawFilledRect( m_InnerPanel->GetBounds() );
	render->RenderText( skin->GetDefaultFont(), Gwen::Point( 0, 0 ), Utility::Format( L"Offset: %i %i", m_InnerPanel->X(), m_InnerPanel->Y() ) );
#else //0
	( void ) skin;
#endif //0
}
Beispiel #2
0
void Canvas::RenderCanvas()
{
	DoThink();

	Gwen::Renderer::Base* render = m_Skin->GetRender();

	render->Begin();

		RecurseLayout( m_Skin );

		render->SetClipRegion( GetBounds() );
		render->SetRenderOffset( Gwen::Point( 0, 0 ) );
		render->SetScale( Scale() );

		if ( m_bDrawBackground )
		{
			render->SetDrawColor( m_BackgroundColor );
			render->DrawFilledRect( GetRenderBounds() );
		}

		DoRender( m_Skin );

		DragAndDrop::RenderOverlay( this, m_Skin );

		ToolTip::RenderToolTip( m_Skin );

	render->End();
}
Beispiel #3
0
void DockBase::RenderOver( Skin::Base* skin )
{
	if ( !m_bDrawHover ) return;

	Gwen::Renderer::Base* render = skin->GetRender();

	render->SetDrawColor( Gwen::Color( 255, 100, 255, 20 ) );
	render->DrawFilledRect( GetRenderBounds() );

	if ( m_HoverRect.w == 0 ) return;

	render->SetDrawColor( Gwen::Color( 255, 100, 255, 100 ) );
	render->DrawFilledRect( m_HoverRect );

	render->SetDrawColor( Gwen::Color( 255, 100, 255, 200 ) );
	render->DrawLinedRect( m_HoverRect );
}
void WindowCanvas::RenderCanvas()
{
	//
	// If there isn't anything going on we sleep the thread for a few ms
	// This gives some cpu time back to the os. If you're using a rendering
	// method that needs continual updates, just call canvas->redraw every frame.
	//
	if  ( !NeedsRedraw() )
	{
		Platform::Sleep( 10 );
		return;
	}

	m_bNeedsRedraw = false;

	Gwen::Renderer::Base* render = m_Skin->GetRender();

	if ( render->BeginContext( this ) )
	{
		render->Begin();

		RecurseLayout( m_Skin );

		render->SetClipRegion( GetRenderBounds() );
		render->SetRenderOffset( Gwen::Point( X() * -1, Y() * -1 ) );
		render->SetScale( Scale() );

		if ( m_bDrawBackground )
		{
			render->SetDrawColor( m_BackgroundColor );
			render->DrawFilledRect( GetRenderBounds() );
		}

		DoRender( m_Skin );

		DragAndDrop::RenderOverlay( this, m_Skin );

		ToolTip::RenderToolTip( m_Skin );

		render->End();
	}

	render->EndContext( this );

	render->PresentContext( this );
}