comparison 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
comparison
equal deleted inserted replaced
582:5e04f6349894 583:47b49b9b0c0a
137 137
138 void RenderBackendSDL::isClearNeeded(bool clear) { 138 void RenderBackendSDL::isClearNeeded(bool clear) {
139 m_clear = clear; 139 m_clear = clear;
140 } 140 }
141 141
142 bool RenderBackendSDL::putPixel(int x, int y, int r, int g, int b) { 142 bool RenderBackendSDL::putPixel(int x, int y, int r, int g, int b, int a) {
143 return static_cast<SDLImage*>(m_screen)->putPixel(x, y, r, g, b); 143 return static_cast<SDLImage*>(m_screen)->putPixel(x, y, r, g, b, a);
144 } 144 }
145 145
146 void RenderBackendSDL::drawLine(const Point& p1, const Point& p2, int r, int g, int b) { 146 void RenderBackendSDL::drawLine(const Point& p1, const Point& p2, int r, int g, int b, int a) {
147 static_cast<SDLImage*>(m_screen)->drawLine(p1, p2, r, g, b); 147 static_cast<SDLImage*>(m_screen)->drawLine(p1, p2, r, g, b, a);
148 } 148 }
149 149
150 void RenderBackendSDL::drawQuad(const Point& p1, const Point& p2, const Point& p3, const Point& p4, int r, int g, int b) { 150 void RenderBackendSDL::drawTriangle(const Point& p1, const Point& p2, const Point& p3, int r, int g, int b, int a) {
151 static_cast<SDLImage*>(m_screen)->drawQuad(p1, p2, p3, p4, r, g, b); 151 static_cast<SDLImage*>(m_screen)->drawTriangle(p1, p2, p3, r, g, b, a);
152 } 152 }
153 153
154 void RenderBackendSDL::drawVertex(const Point& p, const uint8_t size, int r, int g, int b){ 154 void RenderBackendSDL::drawQuad(const Point& p1, const Point& p2, const Point& p3, const Point& p4, int r, int g, int b, int a) {
155 static_cast<SDLImage*>(m_screen)->drawVertex(p, 2, r, g, b); 155 static_cast<SDLImage*>(m_screen)->drawQuad(p1, p2, p3, p4, r, g, b, a);
156 }
157
158 void RenderBackendSDL::drawVertex(const Point& p, const uint8_t size, int r, int g, int b, int a){
159 static_cast<SDLImage*>(m_screen)->drawVertex(p, 2, r, g, b, a);
156 } 160 }
157 161
158 }//FIFE 162 }//FIFE