diff engine/core/video/sdl/renderbackendsdl.cpp @ 583:47b49b9b0c0a

* Improved the floatingtextrenderer. Now you can set an alpha value for font, background quad and border. Splited quad and border into own commands. * Added a triangle function to backends and genericrenderer, also added the functions to set an alpha value for geometric figures.
author helios2000@33b003aa-7bff-0310-803a-e67f0ece8222
date Sat, 07 Aug 2010 16:36:35 +0000
parents b2feacaed53c
children d1df6cf5ff23
line wrap: on
line diff
--- a/engine/core/video/sdl/renderbackendsdl.cpp	Tue Aug 03 13:57:12 2010 +0000
+++ b/engine/core/video/sdl/renderbackendsdl.cpp	Sat Aug 07 16:36:35 2010 +0000
@@ -139,20 +139,24 @@
 		m_clear = clear;
 	}
 
-	bool RenderBackendSDL::putPixel(int x, int y, int r, int g, int b) {
-		return static_cast<SDLImage*>(m_screen)->putPixel(x, y, r, g, b);
+	bool RenderBackendSDL::putPixel(int x, int y, int r, int g, int b, int a) {
+		return static_cast<SDLImage*>(m_screen)->putPixel(x, y, r, g, b, a);
+	}
+
+	void RenderBackendSDL::drawLine(const Point& p1, const Point& p2, int r, int g, int b, int a) {
+		static_cast<SDLImage*>(m_screen)->drawLine(p1, p2, r, g, b, a);
 	}
 
-	void RenderBackendSDL::drawLine(const Point& p1, const Point& p2, int r, int g, int b) {
-		static_cast<SDLImage*>(m_screen)->drawLine(p1, p2, r, g, b);
+	void RenderBackendSDL::drawTriangle(const Point& p1, const Point& p2, const Point& p3, int r, int g, int b, int a) {
+		static_cast<SDLImage*>(m_screen)->drawTriangle(p1, p2, p3, r, g, b, a);
 	}
 
-	void RenderBackendSDL::drawQuad(const Point& p1, const Point& p2, const Point& p3, const Point& p4,  int r, int g, int b) {
-		static_cast<SDLImage*>(m_screen)->drawQuad(p1, p2, p3, p4, r, g, b);
+	void RenderBackendSDL::drawQuad(const Point& p1, const Point& p2, const Point& p3, const Point& p4,  int r, int g, int b, int a) {
+		static_cast<SDLImage*>(m_screen)->drawQuad(p1, p2, p3, p4, r, g, b, a);
 	}
 
-	void RenderBackendSDL::drawVertex(const Point& p, const uint8_t size, int r, int g, int b){
-		static_cast<SDLImage*>(m_screen)->drawVertex(p, 2, r, g, b);
+	void RenderBackendSDL::drawVertex(const Point& p, const uint8_t size, int r, int g, int b, int a){
+		static_cast<SDLImage*>(m_screen)->drawVertex(p, 2, r, g, b, a);
 	}
 
 }//FIFE