// =====================================================================
// WIKI SYSTEM - modificari in: EterPythonLib/PythonWindow.cpp
// CUiRenderTarget::SetRenderingRect + OnRender cu rect extins.
// Fiecare bloc de mai jos are cateva linii de context (deasupra / dedesubt)
// ca sa gasesti locul. Liniile sunt numerotate dupa fisierul original din Valiant2.
// =====================================================================

// ---------- [1] liniile 1048-1050 (context 1045-1053) ----------
	CUiRenderTarget::CUiRenderTarget(PyObject* ppyObject) : CWindow(ppyObject)
	{
		m_dwIndex = -1;
#ifdef ENABLE_WIKI
		memset(&rect_ex, 0, sizeof(rect_ex));
#endif
	}

	DWORD CUiRenderTarget::Type()

// ---------- [2] liniile 1095-1107 (context 1092-1110) ----------
		return true;
	}

#ifdef ENABLE_WIKI
	void CUiRenderTarget::SetRenderingRect(float fLeft, float fTop, float fRight, float fBottom)
	{
		memset(&rect_ex, 0, sizeof(rect_ex));
		float fWidth = float(GetWidth());
		float fHeight = float(GetHeight());

		rect_ex.left = fWidth * fLeft;
		rect_ex.top = fHeight * fTop;
		rect_ex.right = fWidth * fRight;
		rect_ex.bottom = fHeight * fBottom;
	}
#endif

	void CUiRenderTarget::OnRender()
	{

// ---------- [3] liniile 1117-1127 (context 1114-1130) ----------
			TraceError("SetRenderingRect -> target empty!");
			return;
		}
#ifdef ENABLE_WIKI
		RECT rect_real;
		rect_real.left = m_rect.left - rect_ex.left;
		rect_real.top = m_rect.top - rect_ex.top;
		rect_real.right = m_rect.right + rect_ex.right;
		rect_real.bottom = m_rect.bottom + rect_ex.bottom;

		target->SetRenderingRect(&rect_real);
#else
		target->SetRenderingRect(&m_rect);
#endif
		target->RenderTexture();
	}
#endif
